Skip to content

Commit be1a0b9

Browse files
committed
fix isGithubMyMasterBranch() to also work locally
1 parent 90ce255 commit be1a0b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

do/git.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ func verifyOnReleaseBranchMust() {
7979
func isGithubMyMasterBranch() bool {
8080
// https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables
8181
repo := os.Getenv("GITHUB_REPOSITORY")
82+
if repo == "" {
83+
branch := getCurrentBranchMust(".")
84+
return branch == "master"
85+
}
8286
if repo != "sumatrapdfreader/sumatrapdf" {
8387
return false
8488
}

0 commit comments

Comments
 (0)