mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-03 06:08:42 +00:00
fix (auto) cancel of blocked pipelines (#1157)
This commit is contained in:
parent
4afddc2821
commit
7db7e97f3f
1 changed files with 2 additions and 2 deletions
|
@ -29,8 +29,8 @@ import (
|
|||
|
||||
// Cancel the build and returns the status.
|
||||
func Cancel(ctx context.Context, store store.Store, repo *model.Repo, build *model.Build) error {
|
||||
if build.Status != model.StatusRunning && build.Status != model.StatusPending {
|
||||
return ErrBadRequest{Msg: "Cannot cancel a non-running or non-pending build"}
|
||||
if build.Status != model.StatusRunning && build.Status != model.StatusPending && build.Status != model.StatusBlocked {
|
||||
return ErrBadRequest{Msg: "Cannot cancel a non-running or non-pending or non-blocked build"}
|
||||
}
|
||||
|
||||
procs, err := store.ProcList(build)
|
||||
|
|
Loading…
Reference in a new issue