gitsources: add commit status of type `error`

This commit is contained in:
Simone Gotti 2019-05-15 11:26:50 +02:00
parent 81d557d785
commit 2d6ddd0e74
3 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,8 @@ func fromCommitStatus(status gitsource.CommitStatus) gitea.StatusState {
return gitea.StatusPending return gitea.StatusPending
case gitsource.CommitStatusSuccess: case gitsource.CommitStatusSuccess:
return gitea.StatusSuccess return gitea.StatusSuccess
case gitsource.CommitStatusError:
return gitea.StatusError
case gitsource.CommitStatusFailed: case gitsource.CommitStatusFailed:
return gitea.StatusFailure return gitea.StatusFailure
default: default:

View File

@ -63,6 +63,8 @@ func fromCommitStatus(status gitsource.CommitStatus) gitlab.BuildStateValue {
return gitlab.Pending return gitlab.Pending
case gitsource.CommitStatusSuccess: case gitsource.CommitStatusSuccess:
return gitlab.Success return gitlab.Success
case gitsource.CommitStatusError:
return gitlab.Failed
case gitsource.CommitStatusFailed: case gitsource.CommitStatusFailed:
return gitlab.Failed return gitlab.Failed
default: default:

View File

@ -27,6 +27,7 @@ type CommitStatus string
const ( const (
CommitStatusPending CommitStatus = "pending" CommitStatusPending CommitStatus = "pending"
CommitStatusSuccess CommitStatus = "success" CommitStatusSuccess CommitStatus = "success"
CommitStatusError CommitStatus = "error"
CommitStatusFailed CommitStatus = "failed" CommitStatusFailed CommitStatus = "failed"
) )