workflow-dispatch icon indicating copy to clipboard operation
workflow-dispatch copied to clipboard

Feature request: Ignore unexpected inputs

Open SimonWoidig opened this issue 1 year ago • 0 comments

Currently, I am passing a JSON parsed from a command - think slash commands. Well we require multiple fields (like customer, arg and action) which are parsed from the comment. The result is a JSON with some field not needed for some workflows, since not all workflows require the customer input. Currently the workaround is to specify all of the inputs in the workflow, even the ones that are not needed. My idea is to add an input - let's name it ignore-unexpected-inputs - to the benc-uk/workflow-dispatch action to set whether the extra inputs should be ignored, maybe with a warning.

Currently:

...
🚀 Calling GitHub API to dispatch workflow...
Error: Unexpected inputs provided: ["action", "arg", "customer"] - https://docs.github.com/rest/actions/workflows#create-a-workflow-dispatch-event

Desired:

...
Warning: Not passing the unexpected inputs (["action", "arg", "customer"]) to the workflow.
🚀 Calling GitHub API to dispatch workflow...

SimonWoidig avatar Nov 05 '24 14:11 SimonWoidig