CRCLS whitepaper.
Code changes can fall into the types from the Conventional Commits specification.
Common types according to commitlint-config-conventional (based on the Angular convention) can be:
-
build—changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm).
-
chore—other changes that don’t modify src or test files.
-
ci—changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs).
-
docs—documentation only changes.
-
feat—a new feature.
-
fix—a bug fix.
-
perf—a code change that improves performance.
-
refactor—a code change that neither fixes a bug nor adds a feature.
-
revert—reverts a previous commit.
-
style—changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
-
test—adding missing tests or correcting existing tests.
Branches are created from main
and can follow the naming convention below. For common types, see Types.
Convention:
type/description
Example:
feat/add-xyz
Conventional Commits are enforced using commitlint in a husky pre-commit hook.
Convention:
type(scope?): description #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")
Example:
feat: add xyz
-
Title
Titles can follow the naming convention below and match the branch name. For common types, see Types.
Convention:
type: description
Example:
feat: add xyz
-
Body
When creating a new pull request, you will automatically see a template with a checklist in the body.
-
Reviewers
Add at least one reviewer.
-
Labels
Apply related labels.
Always “Squash & merge” your commits into main
.