Merge pull request #2394 from delfer/patch-1

Add ability to restart build of any state
This commit is contained in:
Brad Rydzewski 2018-04-07 10:56:50 -07:00 committed by GitHub
commit 923dcec109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -496,11 +496,8 @@ func PostBuild(c *gin.Context) {
}
switch build.Status {
case model.StatusPending,
model.StatusRunning,
model.StatusDeclined,
model.StatusBlocked,
model.StatusError:
case model.StatusDeclined,
model.StatusBlocked:
c.String(500, "cannot restart a build with status %s", build.Status)
return
}