We use conventionalcommits to format our commit messages. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Sentry Testkit release notes.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>[optional scope]: <description>
[optional body]
[optional footer]
More info about message format and list of types could be found here
git clone git@github.com:zivl/sentry-testkit.gityarn install
- Make sure to write functions with minimal side effects.
- We always prefer
constonlet. - Make up clear and readable variable names and function names.
- Update documentation in case you add/modify/remove any kind of behaviour.
- Test any code that you push in.
- Make sure you're rebased with
masterbranch. Especially if you're working on a long feature. - Your PRs will be merged after passing all relevant conditions (build, testing... etc.).
Releases are fully automated via release-please-action.
Release process:
- merge all related PRs to
masterusing conventional commit messages; - release-please automatically opens a Release PR that bumps the version in
package.jsonand updatesCHANGELOG.md; - once the Release PR is merged, release-please creates a GitHub release and a git tag;
- the CI workflow then builds, tests, and publishes the package to npm automatically.
No manual steps are required. The version bump is determined by the commit types on master:
| Commit type | Version bump |
|---|---|
fix: |
patch |
feat: |
minor |
feat!: / BREAKING CHANGE: |
major |