From 134fb7900c514d4498ce02767715bb16d0d46f36 Mon Sep 17 00:00:00 2001 From: sinlov Date: Fri, 9 Feb 2024 15:05:21 +0800 Subject: [PATCH] fix: update schema event_enum to remove error warning when.event (#3357) change test case to check fix #3356 --- .../yaml/linter/schema/.woodpecker/test-when.yaml | 9 ++++++++- pipeline/frontend/yaml/linter/schema/schema.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yaml b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yaml index 485e04890..867989285 100644 --- a/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yaml +++ b/pipeline/frontend/yaml/linter/schema/.woodpecker/test-when.yaml @@ -25,7 +25,14 @@ steps: commands: - echo "test" when: - event: [push, pull_request, tag, deployment] + event: + - manual + - push + - pull_request + - pull_request_closed + - tag + - deployment + - release when-event-exclude-pull_request_closed: image: alpine diff --git a/pipeline/frontend/yaml/linter/schema/schema.json b/pipeline/frontend/yaml/linter/schema/schema.json index bdb4cccf7..c58f3ebac 100644 --- a/pipeline/frontend/yaml/linter/schema/schema.json +++ b/pipeline/frontend/yaml/linter/schema/schema.json @@ -491,7 +491,7 @@ } }, "event_enum": { - "enum": ["push", "pull_request", "pull_request_closed", "tag", "deployment", "cron", "manual"] + "enum": ["push", "pull_request", "pull_request_closed", "tag", "deployment", "cron", "manual", "release"] }, "event_constraint_list": { "oneOf": [