]> source.dussan.org Git - gitea.git/commitdiff
Fix commit_status problem when testing (#29672) (#29675)
authorGiteabot <teabot@gitea.io>
Fri, 8 Mar 2024 16:04:23 +0000 (00:04 +0800)
committerGitHub <noreply@github.com>
Fri, 8 Mar 2024 16:04:23 +0000 (16:04 +0000)
Backport #29672 by @charles7668

Close #29661

fix #29656

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
services/pull/commit_status.go

index 9504bcf60568abd61e3ba8e7e883bddac27b6c37..59ea25ae776a9cfd80808cc476dd933f395bcf99 100644 (file)
@@ -58,7 +58,7 @@ func MergeRequiredContextsCommitStatus(commitStatuses []*git_model.CommitStatus,
                }
        }
 
-       if matchedCount == 0 {
+       if matchedCount == 0 && returnedStatus == structs.CommitStatusSuccess {
                status := git_model.CalcCommitStatus(commitStatuses)
                if status != nil {
                        return status.State