We enforce certain rules on commits with the following goals in mind:
- Be able to reliably auto-generate the
CHANGELOG.mdwithout any human intervention.
- Be able to automatically and correctly increment the semver version number based on what was done since the last release.
- Be able to get a quick overview of what happened to the project by glancing over the commit history.
- Be able to automatically reference relevant changes from a dependency upgrade.
Each commit message needs to specify the semver-type. Which can be
See the Semantic Versioning specification for a more detailed explanation of the meaning of these types.
See balena commit guidelines for more info about the whole commit structure.
The subject should not contain more than 70 characters, including the type and scope, and the body should be wrapped at 72 characters.
This tag can be used to reference a resource that is relevant to the commit, and can be repeated multiple times in the same commit.
Resource examples include:
- A link to pull requests.
- A link to a GitHub issue.
- A link to a website providing useful information.
- A commit hash.
Its recommended that you avoid relative URLs, and that you include the whole commit hash to avoid any potential ambiguity issues in the future.
If the commit type equals
upgrade, this tag should be present, and should
link to the CHANGELOG section of the dependency describing the changes
introduced from the previously used version.
This tag is used to make GitHub close the referenced issue automatically when the commit is merged.
Its recommended that you provide the absolute URL to the GitHub issue rather than simply writing the ID prefixed by a hash tag for convenience when browsing the commit history outside the GitHub web interface.
A commit can include multiple instances of this tag.