Skip to content

Commit

Permalink
fix spr check skip case
Browse files Browse the repository at this point in the history
commit-id:25628c5f
  • Loading branch information
ejoffe committed Mar 30, 2023
1 parent 9198098 commit 96da77e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ type RepoAssignee struct {
}

func (i *GitHubInfo) Key() string {
return i.RepositoryID + ":" + i.LocalBranch
return i.RepositoryID + "_" + i.LocalBranch
}
4 changes: 3 additions & 1 deletion spr/spr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
Expand Down

0 comments on commit 96da77e

Please sign in to comment.