Skip to content

release-notes: take the paragraph from the tag object, never a commit - #119

Merged
tinic merged 1 commit into
mainfrom
fix/release-notes-tag-body
Sep 28, 2026
Merged

tinic merged 1 commit into
mainfrom
fix/release-notes-tag-body

Conversation

@tinic

@tinic tinic commented Sep 28, 2026

Copy link
Copy Markdown
Owner

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/checkout leaves refs/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, which tools/release-notes.sh treated 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.sh reads the paragraph only when refs/tags/$tag is a tag object. A ref to a commit gets no paragraph, which is the documented lightweight-tag behaviour.
  • release.yml fetches 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

  • With the annotated tag, the notes open with its four bullets.
  • With the tag rewritten as a commit ref (the CI case), the notes have no paragraph instead of the commit body.
  • After the fetch, the tag is a tag object again.

Not addressed: the notes still take the CHANGELOG section from the tag's tree. A rerun on v1.0.0-beta7 therefore renders the beta7 section as it stood at 7fd931d, without the later #117/#118 corrections.

🤖 Generated with Claude Code

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>
@tinic
tinic merged commit 1c8ac68 into main Sep 28, 2026
42 of 43 checks passed
@tinic
tinic deleted the fix/release-notes-tag-body branch September 30, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant