googleapis / googleapis/release-please
feat: combine conventional-commit expansion with GitHub-style PR attribution in changelogs
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
Thanks for stopping by to let us know something could be better!
**Is your feature request related to a problem? Please describe.**
I run release-please-action v4 (release-please 17.3.0) on two repos and each gives me half of the changelog I actually want.
git-chunks uses the default changelog renderer. When I squash-merge a PR whose body ends with extra Conventional Commit messages (`fix: ...`, `docs: ...` and so on), release-please expands them into separate changelog entries grouped by type, which is great because one squash commit can honestly describe several changes. The run log shows it working (4 git commits split into 7 conventional commits):
```
✔ Considering: 4 commits
✔ Considering: 7 commits
```
You can see the result in the release PR: https://github.com/jishnuteegala/git-chunks/pull/9 (several changelog entries produced from fewer merged PRs). But there is no attribution, so nothing says who contributed each change.
glasspick uses `"changelog-type": "github"`. Its release PR (https://github.com/jishnuteegala/glasspick/pull/13) comes out as:
```
* feat: ship GlassPick v2 by @jishnuteegala in https://github.com/jishnuteegala/glasspick/pull/10
```
plus a `New Contributors` section, which I also really like because every entry credits the PR author and links the PR. But the github renderer throws away everything release-please parsed: `src/changelog-notes/github.ts` receives the commits as `_commits` (unused) and just calls GitHub's generate-release-notes API, which means the trailer commits release-please demonstrably parsed in that same run never show up. One merged PR is one line, no matter how many changes the trailers describe.
So right now I have to choose between expansion and attribution, but I would like to have both in one changelog.
**Describe the solution you'd like**
One changelog with both behaviours: conventional-commit expansion (multiple entries from one squash commit, grouped by type/section) and GitHub-style attribution (`by @author in ` per entry, plus a `New Contributors` section).
Two shapes come to mind, in rough preference order:
1. An option on the default renderer, say `include-pr-authors`, that resolves each entry's originating PR and appends `by @author in `, plus an opt-in `include-new-contributors` section. I'd prefer this because the default renderer already has all the parsed commits, so it only needs the PR lookup.
2. Let the `github` changelog type merge in the expanded conventional commits instead of ignoring them.
**Describe alternatives you've considered**
- `include-commit-authors` (#1716, PR #2628) is close but weaker: it credits commit authors rather than PR authors, renders only `(@username)` with no PR URL, has no `New Contributors` section, and is currently reported broken in #2761 because `parseConventionalCommits()` drops the author field.
- Writing a custom changelog-notes implementation, but #2080 notes custom changelog types can't be selected from config, so I can't ship this myself as a plugin.
- Post-processing the release PR with my own workflow that resolves each entry's PR and appends the author. I prototyped this and backed it out, because rewriting a release-please-managed PR body from a second workflow felt too fragile to maintain.
- For now I'm staying on `changelog-type: github` in glasspick and accepting one entry per merged PR, since attribution matters more to me there. I'd switch to the default renderer immediately if it could attribute PR authors.
**Additional context**
Related existing issues: #2758 (append GitHub's generated changelog to release-please's), #2741 (similar want, solved externally), #292 (contributors section request from 2019).
Repro configs, both on release-please-action v4 / release-please 17.3.0:
glasspick (github renderer, gets attribution, loses expansion):
```json
{
"packages": {
".": {
"release-type": "node",
"changelog-type": "github"
}
}
}
```
git-chunks (default renderer, gets expansion, loses attribution):
```json
{
"packages": {
".": {
"release-type": "node"
}
}
}
```
Contributor guide
Research direction
Start by reading src/changelog-notes/github.ts and trace how its unused _commits argument differs from the default changelog renderer. Compare the parsed conventional commits with GitHub's generated release notes and identify the existing changelog tests or entry points that cover both renderers. Done means expanded entries retain PR-author attribution and support a New Contributors section without losing trailer commits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100