Repository navigation
ci: standardize and check the PR changelog notice - #2425
evanlinjin wants to merge 1 commit into
Conversation
Define the changelog notice as one fenced `changelog` block in the PR description: keepachangelog headings, one unwrapped `- <crate>: <change>` line per entry. Document it in CONTRIBUTING.md and the PR template. Add `ci/changelog.py`: `check` validates a PR description's notice (a PR without one passes), run by a new workflow on PR open/edit; `scrape` collects the notices of the PRs merged in a revision range into per-crate keepachangelog sections for the release manager. Fixes bitcoindevkit#2025 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2425 +/- ##
=======================================
Coverage 80.66% 80.66%
=======================================
Files 31 31
Lines 6236 6236
Branches 293 293
=======================================
Hits 5030 5030
Misses 1136 1136
Partials 70 70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I'm hoping to use the release-plz action for this repo which uses the git commits to auto-generate the appropriate changelog files. I've implemented this on a couple smaller repos (rust-cktap and bdk-cl) in our org already as an example. The main requirement from PR contributors is to have proper, well written conventional commit messages. But we should be enforcing that during review anyway. |
|
I'm hoping to use the release-plz action for this repo which uses the git commits to auto-generate the appropriate changelog files. I've implemented this on a couple smaller repos (rust-cktap and bdk-cl) in our org already as an example. The main requirement from PR contributors is to have proper, well written conventional commit messages. But we should be enforcing that during review anyway. |
|
See #2448 for release-plz details. |
|
@notmandatory I'll have a look into that. Either way, it seems like a good idea to have some sort of CI check that ensures correct formatting of either the Changelog notice or commit messages. |
Description
Standardizes the PR description's changelog notice so release managers can scrape it instead of hand-collecting it.
The format is one fenced
changelogblock in the PR description:Added,Changed,Deprecated,Removed,Fixed,Security), as eachcrates/*/CHANGELOG.mdalready uses;- <crate>[, <crate>...]: <change>, ending with#PR(the scraper adds it if missing);Changes:
CONTRIBUTING.mddocuments the format, and the PR template shows it (inside its HTML comment, so an untouched template has no block).ci/changelog.py checkvalidates the notice of a PR description on stdin: known headings, entry syntax, crate names (bdk_<dir>for eachcrates/<dir>), one block at most, no empty block. A PR without a block passes..github/workflows/changelog.ymlruns it on PR open/edit/push. The body goes throughenv, not the script text, and the job has read-only permissions.python3 ci/changelog.py scrape <rev-range> [<crate>](e.g.chain-0.23.2..master bdk_chain) finds theMerge bitcoindevkit/bdk#Ncommits in the range, fetches each PR's description withgh, and prints per-crate keepachangelog sections, warning about malformed notices.Not included: the github-merge prompt suggested in the issue, since that script lives outside this repo.
Fixes #2025
Changelog notice
None: CI and contributor docs only.
🤖 Generated with Claude Code