Skip to content

Conventional Commits

We are using conventional commits for our commit messages.

Commit Message Format

Every commit message should be in the form of:

<type>[optional scope]: <description>
[optional body]
[optional footer(s)]

Summary

The summary should be a short description of the change. It should be no longer than 50 characters and should not end with a period. It should be written in the imperative, e.g. fix not fixed or fixes.

Available types are:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
  • merge: Merge branch <branch-name> into <branch-name>

A breaking change can be indicated by adding ! after the type/scope, e.g. feat(api)!: add API token authentication.

Scopes are optional and should be a noun describing a section of the codebase surrounded by parenthesis, e.g. (api).

Body

The body should include the motivation for the change and contrast this with previous behaviour. It should also include any relevant notes about the implementation. It start with an empty line after the summary and each line should be no longer than 72 characters.

The footer should contain any information about breaking changes and is also the place to reference any issues that this commit closes. It should start with an empty line after the body and each line should be no longer than 72.

Examples

feat!: add API token authentication
This allows users to authenticate with the API by passing an API token
in the Authorization header.
BREAKING CHANGE: API tokens are now required to access the API.
fix(api): fix API token authentication
This fixes an issue where API tokens were not being correctly validated
when passed in the Authorization header.
Closes <Ticket-ID>

For a more detailed explanation of conventional commits and more examples, see the conventional commits specification.