From eb1daa6584c0638c9240c37e42499b18cbb60fd5 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 26 Jan 2026 10:52:38 +0100 Subject: [PATCH 1/2] chore(repo): Add auto changelog generation --- .craft.yml | 3 ++- CONTRIBUTING.md | 19 ++++--------------- package.json | 1 - scripts/get-commit-list.ts | 36 ------------------------------------ 4 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 scripts/get-commit-list.ts diff --git a/.craft.yml b/.craft.yml index 512f0805..e18a6d5b 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,7 +1,8 @@ github: owner: getsentry repo: sentry-javascript-bundler-plugins -changelogPolicy: simple +changelog: + policy: auto preReleaseCommand: bash scripts/craft-pre-release.sh requireNames: - /^sentry-bundler-plugin-core-.*\.tgz$/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3935d9d..8c49965a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,18 +73,7 @@ Our different types of reviews: _These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._ 1. Determine what version will be released (we use [semver](https://semver.org)). -2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript-bundler-plugins/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release. (See details below.) -3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript-bundler-plugins/actions/workflows/release.yml) workflow. -4. A new issue should appear in https://github.com/getsentry/publish/issues. -5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release. - -### Updating the Changelog - -1. Create a new branch. -2. Run `yarn changelog` and copy all commits in the list. -3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release. -4. Paste in the commits you copied earlier. -5. Delete any which aren't user-facing changes. -6. Alphabetize the rest. -7. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by . Thank you for your contributions!`. If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford comma. (It's in the Sentry styleguide!) -8. Commit, push, and open a PR against `main` with the title `meta: Update changelog for `. +2. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript-bundler-plugins/actions/workflows/release.yml) workflow. +3. A new issue should appear in https://github.com/getsentry/publish/issues. +4. At this point, you can review the new changelog entry on the `relase/` branch and make adjustments if necessary. +5. Start the release by adding the approval label on the publish issue diff --git a/package.json b/package.json index 15c26f2d..62a78b6e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "build:watch": "nx run-many --target=build:watch --all", "build:graph": "nx graph", "build:npm": "nx run-many --target=build:npm --all", - "changelog": "ts-node ./scripts/get-commit-list.ts", "check:types": "nx run-many --target=check:types --all", "clean": "nx run-many --target=clean --all", "clean:all": "nx run-many --target=clean:all --all && yarn", diff --git a/scripts/get-commit-list.ts b/scripts/get-commit-list.ts deleted file mode 100644 index 502ff2ea..00000000 --- a/scripts/get-commit-list.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { execSync } from "child_process"; - -function run(): void { - const commits = execSync('git log --format="- %s"').toString().split("\n"); - - const lastReleasePos = commits.findIndex((commit) => /- meta(.*)changelog/i.test(commit)); - - const newCommits = commits.splice(0, lastReleasePos).filter((commit) => { - // Filter out merge commits - if (/Merge pull request/.test(commit)) { - return false; - } - // Filter release branch merged - if (/Merge branch/.test(commit)) { - return false; - } - // Filter release commit itself - if (/release:/.test(commit)) { - return false; - } - - return true; - }); - - newCommits.sort((a, b) => a.localeCompare(b)); - - const issueUrl = "https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/"; - const newCommitsWithLink = newCommits.map((commit) => - commit.replace(/#(\d+)/, `[#$1](${issueUrl}$1)`) - ); - - // eslint-disable-next-line no-console - console.log(newCommitsWithLink.join("\n")); -} - -run(); From 05d2c20fd985cc333210b92051239d4334a5c513 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 26 Jan 2026 11:07:46 +0100 Subject: [PATCH 2/2] remove release.md --- RELEASE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index 59100d91..00000000 --- a/RELEASE.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release Process - -1. Open a PR to update the changelog on `main` -2. After the changelog PR is merged, go to the **Actions** tab and manually trigger the **"Prepare Release"** workflow, entering the version you want to release -3. After the workflow completes, go to [getsentry/publish](https://github.com/getsentry/publish), find the corresponding issue created by the workflow, and add the `accepted` label to finalize the release