Summary
Swap the changelog formatter from the default @changesets/cli/changelog to @changesets/changelog-github so each changelog entry automatically includes a link to the originating PR and the author's GitHub handle.
Before:
- Fix TOC heading scanner missing headings that follow HTML blocks
After:
- Fix TOC heading scanner missing headings that follow HTML blocks (#42) — @datalackey
Steps
-
Install the package:
cd javascript
npm install --save-dev @changesets/changelog-github
-
Update .changeset/config.json:
"changelog": ["@changesets/changelog-github", { "repo": "datalackey/build-tools" }]
-
Add GITHUB_TOKEN to the Apply version bumps step in .github/workflows/javascript-ci.yml:
- name: Apply version bumps
run: npx changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Notes
- The
GITHUB_TOKEN is needed during changeset version (not publish) so the formatter can look up PR metadata.
- No new secrets needed —
secrets.GITHUB_TOKEN is automatically available in all Actions runs.
Summary
Swap the changelog formatter from the default
@changesets/cli/changelogto@changesets/changelog-githubso each changelog entry automatically includes a link to the originating PR and the author's GitHub handle.Before:
After:
Steps
Install the package:
cd javascript npm install --save-dev @changesets/changelog-githubUpdate
.changeset/config.json:Add
GITHUB_TOKENto theApply version bumpsstep in.github/workflows/javascript-ci.yml:Notes
GITHUB_TOKENis needed duringchangeset version(not publish) so the formatter can look up PR metadata.secrets.GITHUB_TOKENis automatically available in all Actions runs.