Commit messages lean heavily towards the convention set out by conventional commits.
Each commit message must be in the format that includes a type, an optional scope and a subject:
type(scope?): subject #scope is optional
Limit the whole message to 72 characters or less!
Example:
build(terraform): burn it all down
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: npm)
- chore: Changes that don't really fall under any other type
- ci: Changes to the CI configuration files and scripts
- 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: Revert a previous commit
- test: Adding missing tests or correcting existing tests
A scope may be provided to a commit’s type, to provide additional contextual information and is contained within a parenthesis
The subject contains a succinct description of the change:
- use the present tense ("Add feature" not "Added feature")
- use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- don't capitalise the first letter
- don't use a fullstop (.) at the end. <- Not this
This repo uses a trunk-based development workflow. There is one permanent branch, the main
branch, which contains stable code and all releases are based off of any commits to this branch.
In order to make updates, a feature branch is made from the main
branch and when it is ready to be merged, it can be brought back into the main
branch which trigger a release (if necessary).
- Create a branch from the
main
branch and use the convention:<feat|fix|ci>/name-of-issue
. - Once the code is ready to be merged into
main
, open a pull request.
⚠️ NOTE: The title must conform to the conventional commit message format outlined above. This is to ensure the merge commit to the main branch is picked up by the CI and creates a release (if necessary).
- To merge the PR, use the "Squash and merge" option. This is to keep the commit history clean and keep the commits on
main
with a 1:1 ratio with previous PRs.