1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-12-11 21:57:08 +02:00

Move "skip ci" logic into global pipeline conditions (#2216)

... and make custom errors follow std err conventions

this fix a 500 response if the whole pipeline is filtered out
This commit is contained in:
6543
2023-08-17 15:52:43 +02:00
committed by GitHub
parent 2222638b10
commit a5ef372190
6 changed files with 41 additions and 20 deletions

View File

@@ -66,7 +66,7 @@ func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline
filtered, parseErr = checkIfFiltered(repo, pipeline, forgeYamlConfigs)
if parseErr == nil {
if filtered {
err := ErrFiltered{Msg: "branch does not match restrictions defined in yaml"}
err := ErrFiltered{Msg: "global when filter of all workflows do skip this pipeline"}
log.Debug().Str("repo", repo.FullName).Msgf("%v", err)
return nil, err
}