vscode-github-actions icon indicating copy to clipboard operation
vscode-github-actions copied to clipboard

Checkbox for Boolean inputs when triggering `workflow_dispatch`

Open AdamRaichu opened this issue 2 years ago • 5 comments
trafficstars

Is your feature request related to a problem? Please describe. When triggering a workflow via the view in vscode, the extension asks for input values. Currently, it generates an error when giving a string that is not true or false for boolean inputs.

Describe the solution you'd like Use a checkbox input instead of a string input when asking vscode user for input.

Additional context Add any other context or screenshots about the feature request here.

AdamRaichu avatar May 11 '23 17:05 AdamRaichu

I'm unclear on what the issue is here, any chance you could take a screenshot?

felipesu19 avatar May 15 '23 20:05 felipesu19

image

I activated "Publish Extension" using the button in the view on the left. It asked for a ref (for which I used the default), then asked for the preRelease input, which as you can see from the screenshot (and code below) is of type boolean. However, it accepts a string answer. Giving a value such as falseeee gives an error message, but it would be better if it accepted the input as a checkbox instead of a text input.

# Workflow File
name: Publish Extension
on:
  workflow_dispatch:
    inputs:
      preRelease:
        type: boolean
        required: true
        default: false
      continueOnTagErr:
        type: boolean
        required: false
        default: false
  # ...
# Error when using invalid input value.
Could not create workflow dispatch: Provided value 'falseeeeeeeee' for input 'preRelease' not in the list of allowed values

AdamRaichu avatar May 15 '23 20:05 AdamRaichu

I see, this is very helpful. Moving over to triage so we can address!

Thank you!

felipesu19 avatar May 18 '23 16:05 felipesu19

As I was looking at the extensions api, perhaps a better option is to use a QuickPick with true and false as the only options.

AdamRaichu avatar May 23 '23 12:05 AdamRaichu

I think it will be better to have a way to select options instead of typing. I think true / false is just one of them.

maxisam avatar Oct 19 '23 16:10 maxisam