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 (go-gitea#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 and GiteaBot committed Jul 25, 2023
1 parent 3e07c54 commit 63cf1ce
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 @@ -143,7 +143,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 63cf1ce

Please sign in to comment.