From 65de747b132655fd0525afb3ff1bba9b65aaa1e9 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Sun, 23 Apr 2023 15:44:45 -0400 Subject: [PATCH] Handle canceled workflow as a warning instead of a fail (#24282) (#24292) Backport #24282 by @wolfogre Follow what Drone CI does: ![image](https://user-images.githubusercontent.com/9418365/233829853-d1c30a30-10cc-4b97-a134-793a79d46d85.png) Co-authored-by: Jason Song --- services/actions/commit_status.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/actions/commit_status.go b/services/actions/commit_status.go index a7304bc77510..01bc3c0e7e34 100644 --- a/services/actions/commit_status.go +++ b/services/actions/commit_status.go @@ -137,8 +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, actions_model.StatusCancelled: + case actions_model.StatusFailure: return api.CommitStatusFailure + case actions_model.StatusCancelled: + return api.CommitStatusWarning case actions_model.StatusWaiting, actions_model.StatusBlocked: return api.CommitStatusPending case actions_model.StatusRunning: