Skip to content

[@changesets/changelog-github] Contributor-only thanks option (skip thanks for repo maintainers) #2149

Description

@castastrophe

The problem

@changesets/changelog-github currently renders every release line as

- [#210](…) [`4f75d34`](…) Thanks [@author](https://github.com/author)! - <summary>

For solo-maintained (or small-team) projects, that means every "Version
Packages" PR reads "Thanks @maintainer! - …" on every entry, i.e. the
maintainer is publicly thanking themselves. 🙃 The existing disableThanks
option is a blunt switch: it hides thanks for everyone, which then
also silences the acknowledgement that outside contributors are
supposed to get.

Proposed option

An allow/deny list, or a maintainers list, that suppresses the "Thanks
@user!" chunk only when the resolved author matches one of the
configured GitHub logins. Everyone else keeps their thanks. Rough shape:

"changelog": [
  "@changesets/changelog-github",
  {
    "repo": "org/name",
    "maintainers": ["castastrophe"]
  }
]

Semantics:

  • When users (the joined "@A, @b" list built at
    changesets-changelog-github.esm.js:144) contains only logins from
    maintainers, drop the entire Thanks …! clause.
  • When users mixes a maintainer with outside contributors, keep the
    full list — that credit is still meaningful.
  • If users is empty (no linked commit/PR author), behavior is
    unchanged.

Backwards compatible: default maintainers to [] and the current output is untouched.

Alternative considered

Wrapping the package with a local changelog module that post-processes
getReleaseLine's output and strips the maintainer's thanks with a
regex. It works (see
example wrapper),
but it duplicates the option surface, adds a resolve step to
.changeset/config.json, and every consumer that wants the same
behavior has to write the same tiny wrapper. A first-class option
would let projects express "the maintainer is us; only shout out real contributors" without a bespoke shim.

Willing to help

Happy to open a PR wiring this into
packages/changelog-github/src/index.ts and the option validation in
@changesets/config if the shape above is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions