• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 23171889425

17 Mar 2026 12:06AM UTC coverage: 61.858% (-0.02%) from 61.882%
23171889425

Pull #4954

github

web-flow
Merge 86598a852 into 111bf902d
Pull Request #4954: chore(deps): bump actions/create-github-app-token from 2 to 3 in the actions-major group

7877 of 12734 relevant lines covered (61.86%)

7.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/internal/utils/git.go
1
package utils
2

3
import (
4
        "os"
5

6
        "github.com/go-git/go-git/v5"
7
        "github.com/spf13/afero"
8
)
9

10
func GetGitBranch(fsys afero.Fs) string {
2✔
11
        return GetGitBranchOrDefault("main", fsys)
2✔
12
}
2✔
13

14
func GetGitBranchOrDefault(def string, fsys afero.Fs) string {
5✔
15
        head := os.Getenv("GITHUB_HEAD_REF")
5✔
16
        if len(head) > 0 {
10✔
17
                return head
5✔
18
        }
5✔
19
        opts := &git.PlainOpenOptions{DetectDotGit: true}
×
20
        if repo, err := git.PlainOpenWithOptions(".", opts); err == nil {
×
21
                if ref, err := repo.Head(); err == nil {
×
22
                        return ref.Name().Short()
×
23
                }
×
24
        }
25
        return def
×
26
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc