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

supabase / cli / 23224184388

18 Mar 2026 01:10AM UTC coverage: 60.017% (-1.8%) from 61.863%
23224184388

Pull #4970

github

web-flow
Merge 61991c119 into 24b7304bd
Pull Request #4970: feat: add apple-container runtime support

829 of 1660 new or added lines in 15 files covered. (49.94%)

8 existing lines in 3 files now uncovered.

8607 of 14341 relevant lines covered (60.02%)

7.63 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 {
3✔
11
        return GetGitBranchOrDefault("main", fsys)
3✔
12
}
3✔
13

14
func GetGitBranchOrDefault(def string, fsys afero.Fs) string {
6✔
15
        head := os.Getenv("GITHUB_HEAD_REF")
6✔
16
        if len(head) > 0 {
12✔
17
                return head
6✔
18
        }
6✔
UNCOV
19
        opts := &git.PlainOpenOptions{DetectDotGit: true}
×
UNCOV
20
        if repo, err := git.PlainOpenWithOptions(".", opts); err == nil {
×
UNCOV
21
                if ref, err := repo.Head(); err == nil {
×
UNCOV
22
                        return ref.Name().Short()
×
UNCOV
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