Skip to content

Commit

Permalink
Fix wrong workflow status when rerun a job in an already finished wor…
Browse files Browse the repository at this point in the history
…kflow (#26119)

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/fb687592-b117-4cd5-b076-2ca5ca847ea4)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/c9b0683e-e81d-410b-8c35-fbe54327fab4)

After workflow finished, if you rerun a single job, the workflow status
will become to `Running` which is not correct as no jobs are running in
this workflow.
  • Loading branch information
yp05327 authored Jul 25, 2023
1 parent 6598d02 commit d817b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/actions/run_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func aggregateJobStatus(jobs []*ActionRunJob) Status {
if !job.Status.IsDone() {
allDone = false
}
if job.Status != StatusWaiting {
if job.Status != StatusWaiting && !job.Status.IsDone() {
allWaiting = false
}
if job.Status == StatusFailure || job.Status == StatusCancelled {
Expand Down

0 comments on commit d817b19

Please sign in to comment.