Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions routers/web/repo/actions/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func ViewPost(ctx *context_module.Context) {
ID: v.ID,
Name: v.Name,
Status: v.Status.String(),
CanRerun: v.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions),
CanRerun: resp.State.Run.CanRerun && !v.Status.IsSkipped(),
Duration: v.Duration().String(),
})
}
Expand Down Expand Up @@ -445,7 +445,7 @@ func Rerun(ctx *context_module.Context) {
return
}
}
ctx.JSON(http.StatusOK, struct{}{})
ctx.JSONOK()
return
}

Expand All @@ -460,12 +460,12 @@ func Rerun(ctx *context_module.Context) {
}
}

ctx.JSON(http.StatusOK, struct{}{})
ctx.JSONOK()
}

func rerunJob(ctx *context_module.Context, job *actions_model.ActionRunJob, shouldBlock bool) error {
status := job.Status
if !status.IsDone() {
if !status.IsDone() || !job.Run.Status.IsDone() {
return nil
}

Expand Down
Loading