Fix bug on pull view when required status check no ci result (#10648) (#10651)

This commit is contained in:
Lunny Xiao 2020-03-07 17:32:08 +08:00 committed by GitHub
parent 07688231c2
commit 7e0a5b17db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,11 @@ func MergeRequiredContextsCommitStatus(commitStatuses []*models.CommitStatus, re
if targetStatus == "" {
targetStatus = structs.CommitStatusPending
commitStatuses = append(commitStatuses, &models.CommitStatus{
State: targetStatus,
Context: ctx,
Description: "Pending",
})
}
if targetStatus.NoBetterThan(returnedStatus) {
returnedStatus = targetStatus