From 80080bdf476fc4930feb1725a286e80bca18a4f9 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 1 Nov 2022 13:13:02 +0100 Subject: [PATCH] Add pipeline.step.when.branch string-array type to schema.json (#1380) Previously the schema only accepted string, this fixes #1379 and matches the linter to the existing capabilities of the constraints.go (and therefore server). --- pipeline/schema/schema.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pipeline/schema/schema.json b/pipeline/schema/schema.json index ee100b4bc..f01532eb0 100644 --- a/pipeline/schema/schema.json +++ b/pipeline/schema/schema.json @@ -200,7 +200,18 @@ }, "branch": { "description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#branch", - "type": "string" + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minLength": 1 + }, + { + "type": "string" + } + ] }, "event": { "description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#event",