Skip to content

Commit 944fa95

Browse files
Fix logical operator casing and enhance release notes handling in Publish-PSModule
1 parent 4e51b8c commit 944fa95

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/helpers/Publish-PSModule.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
Set-GitHubLogGroup 'Event information - Details' {
8484
$defaultBranchName = (gh repo view --json defaultBranchRef | ConvertFrom-Json | Select-Object -ExpandProperty defaultBranchRef).name
85-
$isPullRequest = $githubEvent.PSObject.Properties.Name -Contains 'pull_request'
85+
$isPullRequest = $githubEvent.PSObject.Properties.Name -contains 'pull_request'
8686
if (-not ($isPullRequest -or $whatIf)) {
8787
Write-Warning '⚠️ A release should not be created in this context. Exiting.'
8888
exit
@@ -119,7 +119,7 @@
119119
Set-GitHubLogGroup 'Calculate release type' {
120120
$createRelease = $isMerged -and $targetIsDefaultBranch
121121
$closedPullRequest = $prIsClosed -and -not $isMerged
122-
$createPrerelease = $labels -Contains 'prerelease' -and -not $createRelease -and -not $closedPullRequest
122+
$createPrerelease = $labels -contains 'prerelease' -and -not $createRelease -and -not $closedPullRequest
123123
$prereleaseName = $prHeadRef -replace '[^a-zA-Z0-9]'
124124

125125
$ignoreRelease = ($labels | Where-Object { $ignoreLabels -contains $_ }).Count -gt 0
@@ -376,7 +376,7 @@
376376
}
377377

378378
# Add notes parameter
379-
if ($usePRTitleAsNotesHeading -and $pull_request.title -and $pull_request.body) {
379+
if ($usePRTitleAsNotesHeading -and $usePRBodyAsReleaseNotes -and $pull_request.title -and $pull_request.body) {
380380
$prTitle = $pull_request.title
381381
$prNumber = $pull_request.number
382382
$prBody = $pull_request.body

0 commit comments

Comments
 (0)