diff --git a/github/interface.go b/github/interface.go index 901a5b6..d5ed7a2 100644 --- a/github/interface.go +++ b/github/interface.go @@ -32,5 +32,5 @@ type RepoAssignee struct { } func (i *GitHubInfo) Key() string { - return i.RepositoryID + ":" + i.LocalBranch + return i.RepositoryID + "_" + i.LocalBranch } diff --git a/spr/spr.go b/spr/spr.go index b741ea8..2e3abb9 100644 --- a/spr/spr.go +++ b/spr/spr.go @@ -267,7 +267,9 @@ func (sd *stackediff) MergePullRequests(ctx context.Context, count *uint) { lastCommit := localCommits[len(localCommits)-1] checkedCommit, found := sd.config.Internal.MergeCheckCommit[githubInfo.Key()] - if !found || checkedCommit == "SKIP" || lastCommit.CommitHash != checkedCommit { + if !found { + check(errors.New("need to run merge check 'spr check' before merging")) + } else if checkedCommit != "SKIP" && lastCommit.CommitHash != checkedCommit { check(errors.New("need to run merge check 'spr check' before merging")) } }