mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-04-26 21:44:44 +00:00
Add ability to restart build of any state
This commit is contained in:
parent
9cd328abcd
commit
ea2c72b4b4
1 changed files with 2 additions and 5 deletions
|
@ -496,11 +496,8 @@ func PostBuild(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch build.Status {
|
switch build.Status {
|
||||||
case model.StatusPending,
|
case model.StatusDeclined,
|
||||||
model.StatusRunning,
|
model.StatusBlocked:
|
||||||
model.StatusDeclined,
|
|
||||||
model.StatusBlocked,
|
|
||||||
model.StatusError:
|
|
||||||
c.String(500, "cannot restart a build with status %s", build.Status)
|
c.String(500, "cannot restart a build with status %s", build.Status)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue