diff --git a/services/mailer/mail_workflow_run.go b/services/mailer/mail_workflow_run.go index 9de9d60d82..561e9f2e36 100644 --- a/services/mailer/mail_workflow_run.go +++ b/services/mailer/mail_workflow_run.go @@ -57,11 +57,8 @@ func sendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Rep sort.SliceStable(jobs, func(i, j int) bool { si := jobs[i].Status sj := jobs[j].Status - if si.IsSuccess() { - si = 99 - } - if sj.IsSuccess() { - sj = 99 + if si == sj || si.IsSuccess() { + return false } return si < sj })