Skip to content

ci: standardize and check the PR changelog notice - #2425

Open
evanlinjin wants to merge 1 commit into
bitcoindevkit:masterfrom
evanlinjin:dv/new-6
Open

evanlinjin wants to merge 1 commit into
bitcoindevkit:masterfrom
evanlinjin:dv/new-6

Conversation

@evanlinjin

Copy link
Copy Markdown
Contributor

Description

Standardizes the PR description's changelog notice so release managers can scrape it instead of hand-collecting it.

The format is one fenced changelog block in the PR description:

```changelog
### Fixed
- bdk_esplora, bdk_electrum: `full_scan` no longer stops early when ... #1234
```
  • headings are keepachangelog's (Added, Changed, Deprecated, Removed, Fixed, Security), as each crates/*/CHANGELOG.md already uses;
  • each entry is one unwrapped line - <crate>[, <crate>...]: <change>, ending with #PR (the scraper adds it if missing);
  • PRs with nothing to log leave the block out.

Changes:

  • CONTRIBUTING.md documents the format, and the PR template shows it (inside its HTML comment, so an untouched template has no block).
  • ci/changelog.py check validates the notice of a PR description on stdin: known headings, entry syntax, crate names (bdk_<dir> for each crates/<dir>), one block at most, no empty block. A PR without a block passes.
  • .github/workflows/changelog.yml runs it on PR open/edit/push. The body goes through env, 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 the Merge bitcoindevkit/bdk#N commits in the range, fetches each PR's description with gh, 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

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>
@github-project-automation github-project-automation Bot moved this to Triage in BDK Chain Oct 22, 2026
@evanlinjin
evanlinjin marked this pull request as ready for review October 22, 2026 08:46
@evanlinjin
evanlinjin requested a review from a team as a code owner October 22, 2026 08:46
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.66%. Comparing base (7b68d28) to head (1366909).
⚠️ Report is 5 commits behind head on master.

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           
Flag Coverage Δ
rust 80.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@notmandatory

notmandatory commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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.

@notmandatory notmandatory self-assigned this Oct 29, 2026
@notmandatory notmandatory moved this from Triage to Todo in BDK Chain Oct 29, 2026
@notmandatory

Copy link
Copy Markdown
Contributor

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.

@notmandatory

Copy link
Copy Markdown
Contributor

See #2448 for release-plz details.

@notmandatory notmandatory added the chore Non-coding related work label Oct 30, 2026
@evanlinjin

Copy link
Copy Markdown
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Non-coding related work

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Standardize the changelog section of PR descriptions (per-crate, scrapable format)

2 participants