diff options
author | caicandong <50507092+CaiCandong@users.noreply.github.com> | 2023-07-21 10:24:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 10:24:36 +0200 |
commit | 840830b655a65c0763e3fd4bd0ced9256d2081a5 (patch) | |
tree | cb7ce50867f197eac04b735d57e15c45c43347b7 /services/actions/commit_status.go | |
parent | Fix escape problems in the branch selector (#25875) (diff) | |
download | forgejo-840830b655a65c0763e3fd4bd0ced9256d2081a5.tar.xz forgejo-840830b655a65c0763e3fd4bd0ced9256d2081a5.zip |
Remove commit status running and warning to align GitHub (#25839)
Fix #25776. Close #25826.
In the discussion of #25776, @wolfogre's suggestion was to remove the
commit status of `running` and `warning` to keep it consistent with
github.
references:
-
https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#about-commit-statuses
## :warning: BREAKING :warning:
So the commit status of Gitea will be consistent with GitHub, only
`pending`, `success`, `error` and `failure`, while `warning` and
`running` are not supported anymore.
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Diffstat (limited to 'services/actions/commit_status.go')
-rw-r--r-- | services/actions/commit_status.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/services/actions/commit_status.go b/services/actions/commit_status.go index 6114f2b443..925d0a3396 100644 --- a/services/actions/commit_status.go +++ b/services/actions/commit_status.go @@ -137,14 +137,10 @@ func toCommitStatus(status actions_model.Status) api.CommitStatusState { switch status { case actions_model.StatusSuccess, actions_model.StatusSkipped: return api.CommitStatusSuccess - case actions_model.StatusFailure: + case actions_model.StatusFailure, actions_model.StatusCancelled: return api.CommitStatusFailure - case actions_model.StatusCancelled: - return api.CommitStatusWarning - case actions_model.StatusWaiting, actions_model.StatusBlocked: + case actions_model.StatusWaiting, actions_model.StatusBlocked, actions_model.StatusRunning: return api.CommitStatusPending - case actions_model.StatusRunning: - return api.CommitStatusRunning default: return api.CommitStatusError } |