Skip to content

Commit e5508ff

Browse files
fix(github): normalize branch name
1 parent db92df5 commit e5508ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/condition/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func (gha *GitHubActions) Name() string {
1414
}
1515

1616
func (gha *GitHubActions) GetCurrentBranch() string {
17-
return os.Getenv("GITHUB_REF")
17+
return strings.TrimPrefix(os.Getenv("GITHUB_REF"), "refs/heads/")
1818
}
1919

2020
func (gha *GitHubActions) GetCurrentSHA() string {

0 commit comments

Comments
 (0)