ci: fix release-notes commit range for manual/backport releases - #370
Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intoSep 11, 2026
Merged
Conversation
Addresses two review findings from #368: - Resolve the release endpoint from the tag when it already exists (e.g. a manual workflow_dispatch of an existing tag), instead of always using the dispatch ref's github.sha, which could list commits through the branch tip. - Restrict the previous-tag search to the release commit's ancestry (`git tag --merged`), so re-publishing an older or backport release picks the nearest preceding stable tag rather than a newer, unrelated one. Also drops an unused range_heading variable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Abhijeet Prasad (AbhiPrasad)
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #368, which merged before its automated review comments were addressed. Both Codex findings were valid P2 edge cases; this PR fixes them.
Fixes
1. End the commit range at the released tag (not the dispatch SHA)
On a manual
workflow_dispatchwhereinputs.tagpoints at a different commit than the run'sgithub.sha, the range previously ran to the branch tip. Now the endpoint is resolved from the tag when it already exists, and falls back to the release commit otherwise (the normal push flow, where the tag is created at that commit in the same job).2. Pick the previous tag from the release ancestry
Re-publishing an older or backport release while a higher stable version exists previously selected that newer tag as
previous_tag(yielding an empty/divergentnewer..olderlog and an unrelated compare link). The candidate search is now restricted togit tag --merged <release commit>, so it picks the nearest preceding stable tag in the release's own history.Also drops an unused
range_headingvariable.Validation
Simulated both scenarios against the real repo history:
v0.19.3): previous tagv0.19.2, lists v0.19.3's commits, comparev0.19.2...v0.19.3. ✅v0.19.2whilev0.19.3exists): previous tag correctly resolves tov0.19.1(old logic wrongly pickedv0.19.3), lists only v0.19.2's commits, comparev0.19.1...v0.19.2. ✅Workflow YAML validated.
🤖 Generated with Claude Code
Created by Abhijeet Prasad (@AbhiPrasad)
Slack thread