Skip to content

Checkbox for Boolean inputs when triggering workflow_dispatch #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AdamRaichu opened this issue May 11, 2023 · 5 comments
Open

Checkbox for Boolean inputs when triggering workflow_dispatch #190

AdamRaichu opened this issue May 11, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@AdamRaichu
Copy link
Contributor

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.

@felipesu19
Copy link
Contributor

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

@AdamRaichu
Copy link
Contributor Author

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

@felipesu19
Copy link
Contributor

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

Thank you!

@felipesu19 felipesu19 moved this from Backlog 🗒 to Triaged 📝 in GitHub Actions VS Code Extension May 18, 2023
@AdamRaichu
Copy link
Contributor Author

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.

@maxisam
Copy link

maxisam commented Oct 19, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Triaged 📝
Development

No branches or pull requests

3 participants