feat(release): open the release notes with a notice written above the entries - #355
Merged
Merged
Conversation
… entries Text directly under ## [Unreleased], above the first heading or entry, is copied verbatim to the top of the GitHub release notes and kept under the version's heading in CHANGELOG.md. It used to fail the release as a line that is neither a heading nor an entry. A section with a notice but no entries is still nothing to release. Closes #354
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.
Closes #354
What
A release can now open with a notice, e.g. "0.3.9 is the last 0.3.x release". It is written by hand into
CHANGELOG.mddirectly under## [Unreleased], above the first###heading or-entry.release_notes()splits that text off (_split_notice) and puts it verbatim at the top of the release body, before the first section.promote()already kept it under the new## [X.Y.Z]heading, so it stays on record inCHANGELOG.md; the fresh## [Unreleased]has none, so a notice appears in one release only.###heading nor a-list entry").Rules kept strict
CHANGELOG.mdedit.Docs
docs/DEVELOPMENT.md(changelog/release section) andchangelog.d/README.md. No changelog fragment: this changes release tooling, not the library.Tests
New tests in
tests/test_changelog_release.py: notice verbatim (multi-paragraph), notice before loose entries, prose below a heading still rejected, no-entry releases rejected, and an end-to-endmain()run with fragments that checks both the release notes and the rewritten changelog. Removing the split, the empty check, or the heading-spacing fix each fails 5, 3 and 2 tests respectively.