Skip to content

feat(release): credit contributors in release notes - #915

Merged
blafourcade merged 7 commits into
nextfrom
blafourcade/feat-framework-credit-github-contributors-in-gen
Sep 24, 2026
Merged

blafourcade merged 7 commits into
nextfrom
blafourcade/feat-framework-credit-github-contributors-in-gen

Conversation

@blafourcade

@blafourcade blafourcade commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🎯 What & why

  • Each release line ends with its commit author: (@login), or the name without an account.
  • main accepts merge commits only: a squashed promote silently drops the week's notes.
  • release-please's include-commit-authors is broken (#2761), so a post-processing step does it.

🛠️ How it works

  • scripts/credit-release-authors.cjs, run in ci.yml after the releases are created. Idempotent, continue-on-error.
  • The Release PR and promote merge with --merge --body "". An empty body stops release-please from reading a merge commit twice.
  • .github/rulesets/main.json: allowed_merge_methods: ["merge"]. File only, live unchanged.

🧪 How to verify

  • 549 script tests green; every guard is checked by breaking it.
  • 1148/1148 real release lines credited once; a second pass changes nothing.
  • A throwaway repo ran the real ci.yml job end to end: 5/5 runs green (deleted since).

🚀 Deployment (maintainer)

flowchart TD
  A[Merge #915 into next] --> B[Run promote.yml]
  B --> C{Release PR merged<br/>with --merge, tagged?}
  C -- no --> X[Stop: investigate the ci.yml run]
  C -- yes --> D{Lines show '(@login)'?<br/>Back-merge green?}
  D -- no --> X
  D -- yes --> E[Apply the live ruleset]
  E --> F["Read back: ['merge']"]
Loading
  • Apply: gh api -X PUT repos/ai-driven-dev/framework/rulesets/12902947 --input .github/rulesets/main.json
  • Check: gh api repos/ai-driven-dev/framework/rulesets/12902947 -q '.rules[]|select(.type=="pull_request").parameters.allowed_merge_methods'
  • Rollback: re-add squash and rebase in settings/rules

⚠️ Heads-up

  • Merge a hotfix with an empty body: gh pr merge <n> --merge --body "". If you forget, the release gets fixed, CHANGELOG.md does not.
  • Handles appear in GitHub releases only, not in CHANGELOG.md.
  • Once #2892 ships: turn on the native option, delete the script and its step.

🔗 Linked issue

Closes #911

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

🤖 Generated with Claude Code

blafourcade and others added 7 commits September 23, 2026 12:04
A squashed promote collapses the week's commits into one hidden `ci:`
subject, so release-please reports no user-facing commits and the
entries vanish from the notes; it also collapses authorship onto whoever
merged. A rebase breaks the merge base the back-merge relies on.

The ruleset file now allows only merge commits on main. A bypass in
pull_request mode does not lift that restriction (proven in a sandbox),
so the Release PR moves from --squash --admin to --merge --admin, which
this repository already released from once (#135). The live ruleset is
left unchanged: it must be applied only after one release has merged
with --merge.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
Generated GitHub releases never named the people behind a change.
release-please's own include-commit-authors option is a no-op in every
17.x release so far: parseConventionalCommits drops the author before
the changelog notes see it (googleapis/release-please#2761, fix pending
in #2892).

After release-please creates the cycle's releases, a CI step appends
each line's commit author as (@login), or the name when no account
resolves, resolved from the line's commit SHA. Lines already credited
are left alone, so a re-run changes nothing, and a crediting failure
never blocks the build and publish jobs. Delete the step once a fixed
release-please is pinned.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
The live main ruleset still allows squash and rebase until a maintainer
applies .github/rulesets/main.json, which must wait for one release to
merge with --merge. The docs now describe the rule the file declares
instead of claiming it is enforced today.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
…ishing

A missing RELEASE_OUTPUTS made the script credit nothing and exit 0, and
a failing checkout before the credit step would fail the release-please
job and skip every build and publish job. The script now exits non-zero
on missing outputs, both crediting steps carry continue-on-error, and
tests pin the wiring. A second pass no longer re-appends an author name
containing parentheses, and a release is written back only when its
body changed.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
The repository fills a merge commit's body with the PR title, and
release-please splits a message on each conventional line, so a PR
merged into main as a merge commit is parsed twice: the change appears
twice in the notes, the copy credited to whoever merged. No repository
setting yields an empty body with the "Merge pull request" subject.

The Release PR and promote merges now pass --body "", and hotfixes are
documented to merge with an empty description. Proven in a sandbox: a
default-body merge duplicated the line, an empty-body merge did not.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
A hotfix merged with the default body still reaches release-please
twice. When crediting, a line whose commit is a merge commit is removed
if a non-merge line in the same release carries the same text; a lone
merge-commit line is credited to its pull request's author instead of
whoever merged it. CHANGELOG.md keeps the duplicate.

Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
Refs #911

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AIDD-Session-Id: 3adb1fb2-3894-4e52-afab-424803c7fcad
@blafourcade
blafourcade marked this pull request as ready for review September 24, 2026 04:26
@blafourcade
blafourcade requested a review from a team as a code owner September 24, 2026 04:26
@blafourcade
blafourcade merged commit cdca8e8 into next Sep 24, 2026
39 checks passed
@blafourcade
blafourcade deleted the blafourcade/feat-framework-credit-github-contributors-in-gen branch September 24, 2026 04:47
@aidd-bot aidd-bot Bot mentioned this pull request Sep 24, 2026
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