From be1a0b9a0ade5ecf8f170d4f1d14fe2579b7b825 Mon Sep 17 00:00:00 2001 From: Krzysztof Kowalczyk Date: Thu, 31 Oct 2024 22:53:24 +0100 Subject: [PATCH] fix isGithubMyMasterBranch() to also work locally --- do/git.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/do/git.go b/do/git.go index 04113227d9e5..0614c3a516db 100644 --- a/do/git.go +++ b/do/git.go @@ -79,6 +79,10 @@ func verifyOnReleaseBranchMust() { func isGithubMyMasterBranch() bool { // https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables repo := os.Getenv("GITHUB_REPOSITORY") + if repo == "" { + branch := getCurrentBranchMust(".") + return branch == "master" + } if repo != "sumatrapdfreader/sumatrapdf" { return false }