Lint for event filter and deprecate exclude (#3222)

Closes https://github.com/woodpecker-ci/woodpecker/discussions/2174

- return bad habit error if no event filter is set
- If this is applied, it's useless to allow `exclude`s on events.
Therefore, deprecate it together with `include`s which should be
replaced by `base.StringOrSlice` later.
This commit is contained in:
qwerty287
2024-02-10 17:33:05 +01:00
committed by GitHub
parent 8700d2b300
commit f369d2c543
7 changed files with 211 additions and 17 deletions

View File

@@ -4423,9 +4423,11 @@ const docTemplate = `{
"linter",
"deprecation",
"compiler",
"generic"
"generic",
"bad_habit"
],
"x-enum-comments": {
"PipelineErrorTypeBadHabit": "some bad-habit error",
"PipelineErrorTypeCompiler": "some error with the config semantics",
"PipelineErrorTypeDeprecation": "using some deprecated feature",
"PipelineErrorTypeGeneric": "some generic error",
@@ -4435,7 +4437,8 @@ const docTemplate = `{
"PipelineErrorTypeLinter",
"PipelineErrorTypeDeprecation",
"PipelineErrorTypeCompiler",
"PipelineErrorTypeGeneric"
"PipelineErrorTypeGeneric",
"PipelineErrorTypeBadHabit"
]
},
"model.Workflow": {