Skip to content

Commit 1ba3532

Browse files
tablackburnclaude
andcommitted
ci(release): exclude current tag from compare-link base (review)
Addresses CodeRabbit review on #31: if a v$version tag already exists (e.g. a re-run, or a tag pushed without a release), the previous-tag selection could pick it and produce a self-referential Full Changelog compare link. Filter out "v$version" before selecting the most recent tag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f4607e8 commit 1ba3532

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/PublishModuleToPowerShellGallery.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ jobs:
133133
# Append a compare link against the most recent existing tag. The v$version
134134
# tag does not exist yet (this step creates it), so the latest tag is the
135135
# previous release.
136-
$previousTag = git tag --list 'v*' --sort=-version:refname | Select-Object -First 1
136+
$previousTag = git tag --list 'v*' --sort=-version:refname |
137+
Where-Object { $_ -ne "v$version" } |
138+
Select-Object -First 1
137139
if ($previousTag) {
138140
$body += "`n`n**Full Changelog**: https://github.com/$env:REPOSITORY/compare/$previousTag...v$version"
139141
}

0 commit comments

Comments
 (0)