diff --git a/languageservice/src/validate.test.ts b/languageservice/src/validate.test.ts index 367c39e..8e5865c 100644 --- a/languageservice/src/validate.test.ts +++ b/languageservice/src/validate.test.ts @@ -385,4 +385,31 @@ jobs: expect(result).toEqual([]); }); }); + + describe("workflow_dispatch", () => { + it("allows empty string in choice options", async () => { + const result = await validate( + createDocument( + "wf.yaml", + `on: + workflow_dispatch: + inputs: + plugin-name: + description: Specific plugin to build + type: choice + options: + - '' + - foo + - bar +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo` + ) + ); + + expect(result).toEqual([]); + }); + }); }); diff --git a/workflow-parser/src/workflow-v1.0.json b/workflow-parser/src/workflow-v1.0.json index ba3d154..4d09751 100644 --- a/workflow-parser/src/workflow-v1.0.json +++ b/workflow-parser/src/workflow-v1.0.json @@ -1539,7 +1539,7 @@ }, "default": "workflow-dispatch-input-default", "options": { - "type": "sequence-of-non-empty-string", + "type": "sequence-of-string", "description": "The options of the dropdown list, if the type is a choice." } } @@ -2419,6 +2419,11 @@ "item-type": "non-empty-string" } }, + "sequence-of-string": { + "sequence": { + "item-type": "string" + } + }, "boolean-needs-context": { "context": [ "github",