mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
04b6f90889
Backport #35783 Fix #35780, fix #35782 Rerunning a job or a run is only allowed when the job is done and the run is done. Related PR: #34970 https://github.com/go-gitea/gitea/blob/98ff7d077376db1225f266095788c6bd9414288a/routers/web/repo/actions/view.go#L239 We don't need to check run status again in `rerunJob` because the run status has been changed before `rerunJob`. --- In fact, the bug described in the above issues will not occur on the main branch. Because `getRunJobs` is called before updating the run. https://github.com/go-gitea/gitea/blob/98ff7d077376db1225f266095788c6bd9414288a/routers/web/repo/actions/view.go#L425-L435 So the run status that `rerunJob` checks is the old status. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>