From 5f47163051aecc84e58b4f13c5a3c735efc429c3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 17 Jan 2026 17:38:33 +0100 Subject: [PATCH 1/2] Handle PascalCase PR event payload keys --- scripts/main.ps1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 8271cc6..f18d56b 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -1,4 +1,4 @@ -'powershell-yaml', 'Hashtable' | Install-PSResource -Repository PSGallery -TrustRepository +'powershell-yaml', 'Hashtable' | Install-PSResource -Repository PSGallery -TrustRepository $name = $env:PSMODULE_GET_SETTINGS_INPUT_Name $settingsPath = $env:PSMODULE_GET_SETTINGS_INPUT_SettingsPath @@ -211,12 +211,22 @@ LogGroup 'Calculate Job Run Conditions:' { $pullRequestAction = if ($null -ne $eventData.action) { $eventData.action + } elseif ($null -ne $eventData.Action) { + $eventData.Action } else { $env:GITHUB_EVENT_ACTION } - $pullRequestIsMerged = if ($null -ne $eventData.pull_request -and $null -ne $eventData.pull_request.merged) { - [bool]$eventData.pull_request.merged + $pullRequest = if ($null -ne $eventData.pull_request) { + $eventData.pull_request + } elseif ($null -ne $eventData.PullRequest) { + $eventData.PullRequest + } else { + $null + } + + $pullRequestIsMerged = if ($null -ne $pullRequest -and $null -ne $pullRequest.merged) { + [bool]$pullRequest.merged } else { $false } From 568b19313cd06cd137fafba972ff8754ba6e2f7c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 17 Jan 2026 18:00:38 +0100 Subject: [PATCH 2/2] Fix casing for pull request event payload keys --- scripts/main.ps1 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index f18d56b..c7e7143 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -1,4 +1,4 @@ -'powershell-yaml', 'Hashtable' | Install-PSResource -Repository PSGallery -TrustRepository +'powershell-yaml', 'Hashtable' | Install-PSResource -Repository PSGallery -TrustRepository $name = $env:PSMODULE_GET_SETTINGS_INPUT_Name $settingsPath = $env:PSMODULE_GET_SETTINGS_INPUT_SettingsPath @@ -209,24 +209,20 @@ LogGroup 'Calculate Job Run Conditions:' { } } - $pullRequestAction = if ($null -ne $eventData.action) { - $eventData.action - } elseif ($null -ne $eventData.Action) { + $pullRequestAction = if ($null -ne $eventData.Action) { $eventData.Action } else { $env:GITHUB_EVENT_ACTION } - $pullRequest = if ($null -ne $eventData.pull_request) { - $eventData.pull_request - } elseif ($null -ne $eventData.PullRequest) { + $pullRequest = if ($null -ne $eventData.PullRequest) { $eventData.PullRequest } else { $null } - $pullRequestIsMerged = if ($null -ne $pullRequest -and $null -ne $pullRequest.merged) { - [bool]$pullRequest.merged + $pullRequestIsMerged = if ($null -ne $pullRequest -and $null -ne $pullRequest.Merged) { + [bool]$pullRequest.Merged } else { $false }