fix status check in MergeRequiredContextsCommitStatus

This commit is contained in:
wxiaoguang
2025-05-28 04:11:17 +08:00
parent e6dc1862ec
commit ebeed31671
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -237,7 +237,7 @@ func CalcCommitStatus(statuses []*CommitStatus) *CommitStatus {
var lastStatus *CommitStatus
state := api.CommitStatusSuccess
for _, status := range statuses {
if status.State.HasHigherPriorityThan(state) {
if state == status.State || status.State.HasHigherPriorityThan(state) {
state = status.State
lastStatus = status
}