0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-04 23:35:34 +01:00
This commit is contained in:
NorthRealm 2025-07-08 14:59:30 +08:00
parent d41aee8fa3
commit 2bac8d86d7

View File

@ -53,16 +53,13 @@ func sendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Rep
if err != nil { if err != nil {
log.Error("GetRunJobsByRunID: %v", err) log.Error("GetRunJobsByRunID: %v", err)
return return
} else { }
sort.SliceStable(jobs, func(i, j int) bool { sort.SliceStable(jobs, func(i, j int) bool {
si := jobs[i].Status si := jobs[i].Status
sj := jobs[j].Status sj := jobs[j].Status
if si == sj || si.IsSuccess() { return !(si == sj || si.IsSuccess()) && si < sj
return false
}
return si < sj
}) })
}
convertedJobs := make([]convertedWorkflowJob, 0, len(jobs)) convertedJobs := make([]convertedWorkflowJob, 0, len(jobs))
for _, job := range jobs { for _, job := range jobs {
converted0, err := convert.ToActionWorkflowJob(ctx, repo, nil, job) converted0, err := convert.ToActionWorkflowJob(ctx, repo, nil, job)