release-notes: take the paragraph from the tag object, never a commit - #119
Merged
Merged
Conversation
beta7's published notes carried the #113 squash commit's body instead of the annotated tag's paragraph. actions/checkout leaves the pushed tag as a ref to the commit; on such a ref, %(contents:body) is the commit message, which the script took for the tag body. release-notes.sh reads the body only when refs/tags/$tag is a tag object (a lightweight tag gets no paragraph, as documented), and release.yml fetches the annotated tag object before rendering. Checked on the v1.0.0-beta7 tree: the annotated tag gives its four bullets; the tag rewritten as a commit ref gives no paragraph instead of the commit body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
beta7's published notes carried the #113 squash commit's body instead of the annotated tag's paragraph. They had to be corrected by hand.
Cause. For a tag push,
actions/checkoutleavesrefs/tags/<tag>pointing at the commit, not the annotated tag object. On such a ref,git tag -l --format='%(contents:body)'returns the commit message, whichtools/release-notes.shtreated as the tag's body. The script's comment assumed a lightweight tag yields nothing; in fact it yields the commit's body.Fix
tools/release-notes.shreads the paragraph only whenrefs/tags/$tagis a tag object. A ref to a commit gets no paragraph, which is the documented lightweight-tag behaviour.release.ymlfetches the annotated tag object (git fetch --force origin +refs/tags/$tag:refs/tags/$tag) before rendering, so the real paragraph is used.Checked on the v1.0.0-beta7 tree
tagobject again.Not addressed: the notes still take the CHANGELOG section from the tag's tree. A rerun on
v1.0.0-beta7therefore renders the beta7 section as it stood at 7fd931d, without the later #117/#118 corrections.🤖 Generated with Claude Code