0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 15:34:39 +01:00

Fix wrong workflow status when rerun a job in an already finished workflow (#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.
This commit is contained in:
yp05327 2023-07-25 18:13:36 +09:00 committed by GitHub
parent 6598d0291c
commit d817b199ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {