File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ func ViewPost(ctx *context_module.Context) {
249
249
ID : v .ID ,
250
250
Name : v .Name ,
251
251
Status : v .Status .String (),
252
- CanRerun : v . Status . IsDone () && ctx . Repo . CanWrite ( unit . TypeActions ) ,
252
+ CanRerun : resp . State . Run . CanRerun ,
253
253
Duration : v .Duration ().String (),
254
254
})
255
255
}
@@ -445,7 +445,7 @@ func Rerun(ctx *context_module.Context) {
445
445
return
446
446
}
447
447
}
448
- ctx .JSON ( http . StatusOK , struct {}{} )
448
+ ctx .JSONOK ( )
449
449
return
450
450
}
451
451
@@ -460,12 +460,12 @@ func Rerun(ctx *context_module.Context) {
460
460
}
461
461
}
462
462
463
- ctx .JSON ( http . StatusOK , struct {}{} )
463
+ ctx .JSONOK ( )
464
464
}
465
465
466
466
func rerunJob (ctx * context_module.Context , job * actions_model.ActionRunJob , shouldBlock bool ) error {
467
467
status := job .Status
468
- if ! status .IsDone () {
468
+ if ! status .IsDone () || ! job . Run . Status . IsDone () {
469
469
return nil
470
470
}
471
471
You can’t perform that action at this time.
0 commit comments