-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
getBooleanInput
ignores options.required
#844
Comments
For future visitors, this issue was discussed when the
ref: #725 (comment) However, imo since this function does accept a flag I'd be happy to contribute a PR for this if you agree @thboop |
In the Could you provide a simple reproducing repository? |
Today, I get this:
This appears to have been broken recently (although it's not clear to me how According to the code, the Update: I just realized my include-prerelease: ${{ matrix.dotnet-prerelease }} While there was no setting for |
This is also problematic when trying to run tests for your action, as you have to manually set inputs via envrionment. |
That has nothing to do with the issue here which is about "required" being ignored, does it? |
I think it does actually. The argument above was saying you could provide a default in the YAML for the action, but you can't do that when the YAML isn't being used. I was providing a different use case where the workaround isn't valid. |
Исправленная версия getBooleanInput функции из `@actions/core` - actions/toolkit#844
Исправленная версия getBooleanInput функции из `@actions/core` - actions/toolkit#844
I see this issue is now pretty old and no one is addressing it - this is a particularly annoying one for us as we are using two approaches to check our action changes aren't going to break CIs and neither picked up on this because:
So now we're going to write another "validator" because this hasn't been fixed to ensure that all boolean inputs have a default value if not required. |
Describe the bug
getBooleanInput
to read an unset inputgetBooleanInput
with{ required: false }
to read an unset input throws an errorExpected behavior
getBooleanInput
should function the same asgetInput
in the following ways:options.required
The text was updated successfully, but these errors were encountered: