Skip to content

feat: combine conventional-commit expansion with GitHub-style PR attribution in changelogs #2860

Description

@jishnuteegala

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: jishnuteegala/git-chunks#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 (jishnuteegala/glasspick#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 <PR URL> 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 <url>, 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

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):

{
  "packages": {
    ".": {
      "release-type": "node",
      "changelog-type": "github"
    }
  }
}

git-chunks (default renderer, gets expansion, loses attribution):

{
  "packages": {
    ".": {
      "release-type": "node"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions