Skip to content

Conversation

learn-build-service-prod[bot]
Copy link
Contributor

This PR was automatically created by Auto Publish system to publish changes from the main branch to the live branch.

Prior to this change, the authorization workflow used the PowerShell
script parameter names and casing for the action parameter names.
This worked for all previous parameters because PowerShell is case
insensitive and the parameters were only one word.

However, in #12181, we added the `authorized_accounts` parameter
to the workflow. For GitHub Actions, we use `snake_case` for
parameter names, where PowerShell best practice is to use
`PascalCase`.

PowerShell's case insensitivity meant that we were able to handle
the prior parameters, which the workflow sends to the handler
scripts as the `INPUT_<ParameterName>` environment variables.

When we added `authorized_accounts`, the handler scripts were
looking for `INPUT_AuthorizedAccounts`, which doesn't exist.

This change updates the `Name` key for every defined parameter in
the `verification/authorization/v1` workflow to match the actual
workflow parameter name and casing.
Prior to this change, the authorization parameter handling didn't
correctly handle an empty string for the `authorized_accounts`
parameter. The casing for all other workflows used incorrect
casing for workflow parameters, like `Message_Body` instead of
`message_body`.

This change:

- Corrects the casing of all parameter handler entries.
- Ensures that the parameter handler for `authorized_accounts`
  only passes the parameter to the action script when the
  input value is a non-empty string.
Prior to this change, the `verification/authorization/v1` workflow
definition of the `authorized_accounts` parameter handler defined an
empty scriptblock for the `IfNullOrEmpty` key to indicate that
null/empty values are acceptable for this optional parameter. Instead,
it shouldn't define the `IfNullOrEmpty` key-value pair at all. The
`Get-ActionScriptParameter` helper function ignores null or empty
values when the `IfNullOrEmpty` key isn't defined.

This change removes the `IfNullOrEmpty` key-value pair from the
`authorized_accounts` parameter handler definition.
Copy link
Contributor Author

Learn Build status updates of commit 4552e66:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/commenting/expectations/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/stale-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/verification/authorization/v1/Parameters.psd1 ✅Succeeded
.github/actions/verification/checklist/v1/Parameters.psd1 ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod learn-build-service-prod bot merged commit f3034e3 into live Jul 31, 2025
38 of 40 checks passed
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

Successfully merging this pull request may close these issues.

1 participant