Skip to content

Commit 08cdc0d

Browse files
GiteaBotyp05327
andauthored
Fix wrong workflow status when rerun a job in an already finished workflow (#26119) (#26124)
Backport #26119 by @yp05327 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. Co-authored-by: yp05327 <576951401@qq.com>
1 parent 3e07c54 commit 08cdc0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/actions/run_job.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func aggregateJobStatus(jobs []*ActionRunJob) Status {
143143
if !job.Status.IsDone() {
144144
allDone = false
145145
}
146-
if job.Status != StatusWaiting {
146+
if job.Status != StatusWaiting && !job.Status.IsDone() {
147147
allWaiting = false
148148
}
149149
if job.Status == StatusFailure || job.Status == StatusCancelled {

0 commit comments

Comments
 (0)