Skip to content

docs(claude-md): credit each changelog entry to its pull request and author - #2941

Merged
datlechin merged 1 commit into
mainfrom
docs/credit-contributors-in-changelog
Sep 17, 2026
Merged

datlechin merged 1 commit into
mainfrom
docs/credit-contributors-in-changelog

Conversation

@datlechin

Copy link
Copy Markdown
Member

Release notes are built from CHANGELOG.md, and they credited nobody. GitHub's own generated notes end every line with by @author in #123. This gives every released entry the same credit, in the parens it already ends with:

- Nested Elasticsearch fields showing as null in the grid, and filters on those leaves matching nothing. (#2905 by @digows)
- OceanBase MySQL-mode connection type on the MySQL driver. (#1748, #2741 by @J2TeamNNL)

Why the release adds it, not the pull request

A pull request has no number until it is opened, so an entry written with the change cannot carry one, and a contributor should not need a second commit to add it. scripts/ci/changelog_credits.py stamps it at release time from the history:

  1. git blame names the commit that wrote each entry line.
  2. The squash merge subject ends with the pull request number.
  3. gh pr view names that pull request's author, the person credited, not whoever merged it.

It folds the credit into an existing issue reference ((#1748) becomes (#1748, #2741 by @J2TeamNNL)), never repeats a number that is already there, and never touches an entry that is already credited. An entry whose commit has no pull request number, or that is not committed yet, is left bare and listed so the release can credit it by hand.

Dry run against [Unreleased] as it stands: 236 entries credited across 81 pull requests, none left bare. The three contributors' entries (@J2TeamNNL #2741, @digows #2905, @filipac #2927) land on their own lines. Blame credits the last commit to touch a line, so a maintainer rewording a contributor's entry later would take the credit; each contributor PR's lines were checked against their current blame and none had been.

What changed

  • scripts/ci/changelog_credits.py and test_changelog_credits.py (15 cases), run in Repo Hygiene next to the release note tests.
  • CLAUDE.md rule 1 states the credit and that the release, not the pull request, adds it.
  • The release skill runs it as pre-flight step 6, before any rewording. A line reworded in the working tree blames to nothing and would be skipped. The length check now measures entries without the credit.
  • CONTRIBUTING.md tells contributors to leave the credit off.

@datlechin
datlechin merged commit f64bfd3 into main Sep 17, 2026
7 of 12 checks passed
@datlechin
datlechin deleted the docs/credit-contributors-in-changelog branch September 17, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant