Set the initial commit status to Success otherwise it will always be Pending (#10317) (#10318)

Backport #10317

The commit status code has a bug whereby setting the initial status to Pending means you can never have the status of Success - it should be set to Success.
This commit is contained in:
zeripath 2020-02-17 20:50:59 +00:00 committed by GitHub
parent 4529a262c0
commit 117dcf1c02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func MergeRequiredContextsCommitStatus(commitStatuses []*models.CommitStatus, re
return structs.CommitStatusSuccess
}
var returnedStatus = structs.CommitStatusPending
var returnedStatus = structs.CommitStatusSuccess
for _, ctx := range requiredContexts {
var targetStatus structs.CommitStatusState
for _, commitStatus := range commitStatuses {