Skip to content

Commit 368df53

Browse files
committed
chore(docs): Add commit, issue & PR guidelines
Update `CONTRIBUTING.md` to include some guidelines on writing commits, using issues and PRs.
1 parent 4b137b7 commit 368df53

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ When contributing to the codebase, please note:
8181
- Non-trivial PRs will not be accepted without tests (see above).
8282
- Please do not bump version numbers yourself.
8383
- [`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).
84+
- Make sure to follow the [Commit, Issue & PR guidelines](#commit-issue--pr-guidelines)
8485

8586
## PR reviews
8687

@@ -99,6 +100,35 @@ 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+
### Issues
118+
119+
Issues should at least be categorized by package, for example `package: Node`.
120+
Additional labels for categorization can be added, and the Sentry SDK team may also add further labels as needed.
121+
122+
### Pull Requests (PRs)
123+
124+
PRs are merged via `Squash and merge`.
125+
This means that all commits on the branch will be squashed into a single commit, and commited as such onto master.
126+
127+
* The PR name can generally follow the commit name (e.g. `feat(core): Set custom transaction source for event processors`)
128+
* Use labels the same way as for issues
129+
* Make sure to rebase the branch on `master` before squashing it
130+
* Make sure to update the commit message of the squashed branch to follow the commit guidelines - including the PR number
131+
102132
## Publishing a Release
103133
104134
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._

0 commit comments

Comments
 (0)