Skip to content

Commit 31bf467

Browse files
authored
chore(docs): Add commit, issue & PR guidelines (#6022)
Update `CONTRIBUTING.md` to include some guidelines on writing commits, using issues and PRs.
1 parent 89e4e9f commit 31bf467

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Note: you must run `yarn build` before `yarn lint` will work.
7878

7979
When contributing to the codebase, please note:
8080

81+
- Make sure to follow the [Commit, Issue & PR guidelines](#commit-issue--pr-guidelines)
8182
- Non-trivial PRs will not be accepted without tests (see above).
8283
- Please do not bump version numbers yourself.
8384
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-js) and [`raven-node`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-node) are deprecated, and only bug and security fix PRs will be accepted targeting the [3.x branch](https://github.com/getsentry/sentry-javascript/tree/3.x). Any new features and improvements should be to our new SDKs (`browser`, `node`, and framework-specific packages like `react` and `nextjs`) and the packages which support them (`core`, `utils`, `integrations`, and the like).
@@ -99,6 +100,36 @@ Our different types of reviews:
99100
3. **Only comments.** You must address all the comments and need another review until you merge.
100101
4. **Request changes.** Only use if something critical is in the PR that absolutely must be addressed. We usually use `h` comments for that. When someone requests changes, the same person must approve the changes to allow merging. Use this sparingly.
101102

103+
## Commit, Issue & PR guidelines
104+
105+
### Commits
106+
107+
For commit messages, we use the format:
108+
109+
```
110+
<type>(<scope>): <subject> (<github-id>)
111+
````
112+
113+
For example: `feat(core): Set custom transaction source for event processors (#5722)`.
114+
115+
See [commit message format](https://develop.sentry.dev/commit-messages/#commit-message-format) for details.
116+
117+
The Github-ID can be left out until the PR is merged.
118+
119+
### Issues
120+
121+
Issues should at least be categorized by package, for example `package: Node`.
122+
Additional labels for categorization can be added, and the Sentry SDK team may also add further labels as needed.
123+
124+
### Pull Requests (PRs)
125+
126+
PRs are merged via `Squash and merge`.
127+
This means that all commits on the branch will be squashed into a single commit, and commited as such onto master.
128+
129+
* The PR name can generally follow the commit name (e.g. `feat(core): Set custom transaction source for event processors`)
130+
* Make sure to rebase the branch on `master` before squashing it
131+
* Make sure to update the commit message of the squashed branch to follow the commit guidelines - including the PR number
132+
102133
## Publishing a Release
103134
104135
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._

0 commit comments

Comments
 (0)