Skip to content

Commit 15c2100

Browse files
authored
feat(dev): Add changelog instructions to CONTRIBUTING.md (getsentry#4519)
This adds instructions for updating the changelog, partially to ensure consistency and partially as a place to write down the relevant `git log` command and linkifying regex.
1 parent 6097d4f commit 15c2100

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,19 @@ When contributing to the codebase, please note:
7979
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._
8080

8181
1. Determine what version will be released (we use [semver](https://semver.org)).
82-
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release.
82+
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/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.)
8383
3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) workflow.
8484
4. A new issue should appear in https://github.com/getsentry/publish/issues.
8585
5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release.
86+
87+
### Updating the Changelog
88+
89+
1. Create a new branch.
90+
2. Run `git log --format="- %s"` and copy everything since the last release.
91+
3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release.
92+
4. Paste in the logs you copied earlier.
93+
5. Delete any which aren't user-facing changes.
94+
6. Alphabetize the rest.
95+
7. Run a regex find and replace, searching for `\(#(\d+)\)` and replacing it with `([#$1](https://github.com/getsentry/sentry-javascript/pull/$1))`. (This will linkify all of the PR references.)
96+
8. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by <list of external contributors' GitHub usernames>. 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!)
97+
9. Commit, push, and open a PR with the title `meta: Update changelog for <fill in relevant version here>`.

0 commit comments

Comments
 (0)