chore: enable automatic CHANGELOG generation via Changesets#945
chore: enable automatic CHANGELOG generation via Changesets#945
Conversation
f2a1c65 to
b8b74d9
Compare
a65405e to
12b544b
Compare
Switch from manual CHANGELOG management to @changesets/changelog-github. - Update .changeset/config.json to use @changesets/changelog-github - Pass GITHUB_TOKEN to changeset version step in release workflow (@changesets/changelog-github needs it to fetch PR metadata for links) - Fix git add to include CHANGELOG.md (pre-existing bug — changeset version modifies CHANGELOG.md but it was never staged in the commit step) - Fix stale v3.0.6 '(Unreleased)' label — published to npm August 25, 2025
…ELOG date Two items from the PR 4a plan that were missed in the original commit: 1. @changesets/changelog-github was referenced in .changeset/config.json but never declared in package.json devDependencies. The lockfile had the specifier (from pnpm install), so CI's --frozen-lockfile saw a mismatch and failed. 2. CHANGELOG.md v3.0.6 date was still "(Unreleased)" — v3.0.6 was published to npm on August 25, 2025.
b8b74d9 to
1c79bb9
Compare
| git config --global user.name 'github-actions[bot]' | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git add package.json .changeset | ||
| git add package.json .changeset CHANGELOG.md |
There was a problem hiding this comment.
praise: good catch - changeset version was already generating CHANGELOG.md updates, but they were never staged in the commit step. this was a silent bug.
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git add package.json .changeset | ||
| git add package.json .changeset CHANGELOG.md | ||
| git commit -m "Update package version & delete changesets" |
There was a problem hiding this comment.
nit: the commit message says "Update package version & delete changesets" but now it also commits CHANGELOG.md changes. might be worth updating to reflect that - something like "Update package version, changelog & delete changesets". not fussed either way though.
| git commit -m "Update package version & delete changesets" | |
| git commit -m "Update package version, changelog & delete changesets" |
| "@babel/plugin-transform-template-literals": "7.4.4", | ||
| "@babel/plugin-transform-typeof-symbol": "7.2.0", | ||
| "@babel/preset-typescript": "^7.27.1", | ||
| "@changesets/changelog-github": "^0.6.0", |
There was a problem hiding this comment.
non-blocking: @changesets/changelog-github pulls in node-fetch, dataloader, and dotenv as transitive deps. this is fine for a devDependency that only runs in CI, but worth noting - dotenv reads .env files from the working directory, so if one ever gets added to the repo it could affect the changeset version step. low risk, just flagging for awareness.
| @@ -1,5 +1,5 @@ | |||
| # Changelog | |||
| ### v3.0.6 (Unreleased) | |||
| ### v3.0.6 (August 25, 2025) | |||
There was a problem hiding this comment.
praise: cheers for fixing the stale "(Unreleased)" label - v3.0.6 has been on npm since August.

Part of https://github.com/Shopify/developer-tools-team/issues/1195
Switch from manual CHANGELOG management to @changesets/changelog-github.
(@changesets/changelog-github needs it to fetch PR metadata for links)
modifies CHANGELOG.md but it was never staged in the commit step)
Verification
Smoke-tested the CHANGELOG automation locally:
@shopify/buy-button-js: patch)GITHUB_TOKEN=$(gh auth token) pnpm exec changeset version## 3.0.7section containing the test entrygit checkout -- package.json CHANGELOG.md && rm .changeset/test-changelog-automation.md)Result:
changeset versionexits 0, plugin loads correctly, and CHANGELOG.md is generated with proper formatting.