Skip to content
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

Should enum inputs be case-insensitive? #123

Open
anthony-c-martin opened this issue Jan 17, 2025 · 0 comments
Open

Should enum inputs be case-insensitive? #123

anthony-c-martin opened this issue Jan 17, 2025 · 0 comments

Comments

@anthony-c-martin
Copy link
Member

We have various action inputs that take a fixed set of values, or a list of a fixed set of values.

Some examples:
type - must be either deployment or deploymentStacks
scope - must be either tenant, managementGroup, subscription or resourceGroup

Currently our validation logic is strict - the casing has to match exactly. This means that we would reject scope: Tenant or type: deploymentstacks.

As raised in #85 (comment), this is a bit odd with our environment input, as it requires camel case (azureCloud, azureChinaCloud, azureGermanCloud, azureUSGovernment), whereas the environment input for the "azure-login" action (which this is commonly used with) requires Pascal Case (AzureCloud, AzureChinaCloud, AzureGermanCloud, AzureUSGovernment) - see https://github.com/marketplace/actions/azure-login#environment

IMO the best option for dealing with this inconsistency would be to relax our validation such that we don't care about casing for enum inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant