Skip to content

Commit aab6fe9

Browse files
Fix issue where merge would not correctly delete tags due to logic error
1 parent 6ea0cb1 commit aab6fe9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/main.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ if (-not $isPullRequest) {
7272
'A release should not be created in this context. Exiting.'
7373
return
7474
}
75+
7576
Write-Output '-------------------------------------------------'
7677
Write-Output "Is a pull request event: [$isPullRequest]"
7778
Write-Output "Action type: [$($githubEvent.action)]"
@@ -96,8 +97,8 @@ $majorTags = @('major', 'breaking')
9697
$minorTags = @('minor', 'feature', 'improvement')
9798
$patchTags = @('patch', 'fix', 'bug')
9899

99-
$createRelease = $pull_request.base.ref -eq 'main' -and $pull_request.merged -eq 'True'
100-
$closedPullRequest = $pull_request.state -eq 'closed' -and $pull_request.merged -eq 'False'
100+
$createRelease = $pull_request.base.ref -eq 'main' -and ($pull_request.merged).ToString() -eq 'True'
101+
$closedPullRequest = $pull_request.state -eq 'closed' -and ($pull_request.merged).ToString() -eq 'False'
101102
$preRelease = $labels -Contains 'prerelease'
102103
$createPrerelease = $preRelease -and -not $createRelease
103104

0 commit comments

Comments
 (0)