Skip to content

Commit 7b86980

Browse files
(GHA) Fix authorization workflow (MicrosoftDocs#12252)
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 MicrosoftDocs#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.
1 parent e65fd79 commit 7b86980

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/actions/verification/authorization/v1/Parameters.psd1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@{
22
Parameters = @(
33
@{
4-
Name = 'Repository'
4+
Name = 'repository'
55
Type = 'string'
66
IfNullOrEmpty = {
77
param($ErrorTarget)
@@ -30,7 +30,7 @@
3030
}
3131
}
3232
@{
33-
Name = 'AuthorizedAccounts'
33+
Name = 'authorized_accounts'
3434
Type = 'String[]'
3535
IfNullOrEmpty = {
3636
param($ErrorTarget)
@@ -50,7 +50,7 @@
5050
}
5151

5252
@{
53-
Name = 'Permissions'
53+
Name = 'permissions'
5454
Type = 'String[]'
5555
IfNullOrEmpty = {
5656
param($ErrorTarget)
@@ -118,7 +118,7 @@
118118
}
119119

120120
@{
121-
Name = 'Target'
121+
Name = 'target'
122122
Type = 'String[]'
123123
IfNullOrEmpty = {
124124
param($ErrorTarget)
@@ -191,7 +191,7 @@
191191
}
192192

193193
@{
194-
Name = 'User'
194+
Name = 'user'
195195
Type = 'String'
196196
IfNullOrEmpty = {
197197
param($ErrorTarget)
@@ -222,4 +222,4 @@
222222
}
223223
}
224224
)
225-
}
225+
}

0 commit comments

Comments
 (0)