File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,12 @@ If you believe this is incorrect, please verify that your changes are in the cor
296296"@
297297 try {
298298 Write-Host ' Adding comment to PR about skipped stages...'
299- $null = Invoke-GitHubAPI - Method POST - ApiEndpoint " /repos/$owner /$repo /issues/$prNumber /comments" - Body (@ { body = $commentBody } | ConvertTo-Json )
299+ $apiParams = @ {
300+ Method = ' POST'
301+ ApiEndpoint = " /repos/$owner /$repo /issues/$prNumber /comments"
302+ Body = @ { body = $commentBody } | ConvertTo-Json
303+ }
304+ $null = Invoke-GitHubAPI @apiParams
300305 Write-Host ' ✓ Comment added successfully'
301306 } catch {
302307 Write-Warning " Could not add PR comment (may need 'issues: write' permission): $_ "
@@ -514,7 +519,10 @@ LogGroup 'Calculate Job Run Conditions:' {
514519 # Calculate if prereleases should be cleaned up:
515520 # True if (Release, merged PR to default branch, or Abandoned PR) AND user has AutoCleanup enabled (defaults to true)
516521 # Even if no important files changed, we still want to cleanup prereleases when merging to default branch
517- $shouldAutoCleanup = (($releaseType -eq ' Release' ) -or ($isMergedPR -and $isTargetDefaultBranch ) -or $isAbandonedPR ) -and ($settings.Publish.Module.AutoCleanup -eq $true )
522+ $isReleaseOrMergedOrAbandoned = ($releaseType -eq ' Release' ) -or
523+ ($isMergedPR -and $isTargetDefaultBranch ) -or
524+ $isAbandonedPR
525+ $shouldAutoCleanup = $isReleaseOrMergedOrAbandoned -and ($settings.Publish.Module.AutoCleanup -eq $true )
518526
519527 # Update Publish.Module with computed release values
520528 $settings.Publish.Module | Add-Member - MemberType NoteProperty - Name ReleaseType - Value $releaseType - Force
You can’t perform that action at this time.
0 commit comments