We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e17c17d commit 4c18731Copy full SHA for 4c18731
routers/web/repo/actions/view.go
@@ -279,12 +279,14 @@ func Rerun(ctx *context_module.Context) {
279
return
280
}
281
282
- // reset run's start and stop time
283
- run.Started = 0
284
- run.Stopped = 0
285
- if err := actions_model.UpdateRun(ctx, run, "started", "stopped"); err != nil {
286
- ctx.Error(http.StatusInternalServerError, err.Error())
287
- return
+ // reset run's start and stop time when it is done
+ if run.Status.IsDone() {
+ run.Started = 0
+ run.Stopped = 0
+ if err := actions_model.UpdateRun(ctx, run, "started", "stopped"); err != nil {
+ ctx.Error(http.StatusInternalServerError, err.Error())
288
+ return
289
+ }
290
291
292
job, jobs := getRunJobs(ctx, runIndex, jobIndex)
0 commit comments