This repo uses Conventional Commits to standardize the format of commit messages. This enables the automation of versioning and the generation of changelogs and release notes.
We follow the standard commit types (feat, fix, docs, style, refactor, etc.)
and additionally use a custom infra type for infrastructure changes
such as GitHub settings, Terraform configurations,
and other DevOps-related changes.
Visit the website for more details about the format; but essentially, commit messages should follow this pattern:
type[(scope)][!]: description
[body]
[footer(s)]
The type and description are the only two required components;
but here's a quick explanation of all of them:
type- (Required) One of the following values:build- A change that affects the build system or external dependencieschore- A routine task, maintenance, etc., that doesn't change production codeci- A change to CI configuration files or scriptsdocs- A documentation-only changefeat- A new feature for the user or a significant enhancementfix- A bug fixinfra- A change to infrastructure code (Terraform, GitHub settings, DevOps, etc.)perf- A code change that improves performancerefactor- A code change that neither fixes a bug nor adds a featurerevert- Reverts a previous commitstyle- A change that does not affect code behavior (formatting, spacing)test- Adding or correcting tests
(scope)- (Optional) In parentheses, indicates the section of the codebase affected (e.g.,ui,api,auth)!- (Optional) Indicates a breaking change (alternative to usingBREAKING CHANGE:in the footer)description- (Required) A concise, single-line description of the changes in imperative, present tense (use "change," not "changed," "changes," or "changing")body- (Optional) Provides additional contextual information about the changes, explaining motivation, reasoning, or notable implementation detailsfooter(s)- (Optional) References to issues, PRs, or other metadataBREAKING CHANGE:- Special footer indicating a breaking change, with a description of the change and migration notes
To facilitate all this, a default Git message template is included in the project. You can activate it by running the following command from the repo root:
git config commit.template .gitmessageAfterward, whenever you run git commit (without the -m switch),
the template should be displayed in your configured text editor.
Other Git tooling should pick it up as well.
Simply replace the template with your formatted commit message and save it.
If you're new to or unfamiliar with Conventional Commits, there are several good cheat sheets out there that can help you get familiar with it: