Skip to content

Commit d817b19

Browse files
authored
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.
1 parent 6598d02 commit d817b19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/actions/run_job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func aggregateJobStatus(jobs []*ActionRunJob) Status {
150150
if !job.Status.IsDone() {
151151
allDone = false
152152
}
153-
if job.Status != StatusWaiting {
153+
if job.Status != StatusWaiting && !job.Status.IsDone() {
154154
allWaiting = false
155155
}
156156
if job.Status == StatusFailure || job.Status == StatusCancelled {

0 commit comments

Comments
 (0)