mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 16:45:03 +02:00
terrible
This commit is contained in:
parent
d41aee8fa3
commit
2bac8d86d7
@ -53,16 +53,13 @@ func sendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Rep
|
||||
if err != nil {
|
||||
log.Error("GetRunJobsByRunID: %v", err)
|
||||
return
|
||||
} else {
|
||||
sort.SliceStable(jobs, func(i, j int) bool {
|
||||
si := jobs[i].Status
|
||||
sj := jobs[j].Status
|
||||
if si == sj || si.IsSuccess() {
|
||||
return false
|
||||
}
|
||||
return si < sj
|
||||
})
|
||||
}
|
||||
sort.SliceStable(jobs, func(i, j int) bool {
|
||||
si := jobs[i].Status
|
||||
sj := jobs[j].Status
|
||||
return !(si == sj || si.IsSuccess()) && si < sj
|
||||
})
|
||||
|
||||
convertedJobs := make([]convertedWorkflowJob, 0, len(jobs))
|
||||
for _, job := range jobs {
|
||||
converted0, err := convert.ToActionWorkflowJob(ctx, repo, nil, job)
|
||||
|
Loading…
x
Reference in New Issue
Block a user