You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate release notes from merged pull requests (#986)
* Generate release notes from merged pull requests
Cutting a release required hand-writing a CHANGELOG.md section first, and
release.sh hard-failed without one. That is a whole pull request per
release whose only job is narrating the previous ones, written after the
fact by whoever remembers, and free to drift from what actually merged.
release.sh now asks GitHub for the notes covering every pull request since
the previous tag, each credited to its author. The tag does not exist yet
at that point in the run, so target_commitish anchors the range end at the
commit being released — verified against the live API.
The runtime keeps working unchanged. The generated body is written back as
a ## [X.Y.Z] section, so CHANGELOG.md still ships in DOC_FILES and
/changelog still reads it offline. A hand-written section still wins when
a release deserves narration, and --notes still overrides both.
Generated bodies open with their own h2s. parseChangelogText ends a
version section at the next line starting with "## ", so those are demoted
to h3 on write — without that the entry truncates to its header and
/changelog renders an empty release.
CL-7888
* Write the generated notes where the release can actually commit them
Two bugs, both fatal to the generate-notes path.
write_changelog_section ran during preflight, so it dirtied a tracked
file before the release-commit step, which refuses to run on an unclean
tree. Every generated-notes release would have died there. And nothing
staged CHANGELOG.md anyway, so the section would never have reached main.
The write now happens in the release-commit step and is staged with the
version bump, which also puts it in DOC_FILES before the binaries build.
The insertion point matched the first `## [` of any kind, which is the
live `## [Unreleased]` heading — the new release sorted above it and
stranded its contents below every future release. It now targets the
first versioned header, and warns when Unreleased still has content,
since nothing renames it any more.
previous_tag is gone. The script fetches with --no-tags and never
refreshes tags, so deriving the previous tag locally would replay
already-released pull requests from a stale clone. GitHub derives it from
release history instead. That also removes a set -e trap: the pipeline
returned 1 on a first release and only survived because command
substitution under `||` suspends errexit.
CL-7888
* Fix dead changelog fallback and use conventional release subject
0 commit comments