docs/content/contributing/guidelines/commit-message.md
The reasons for these conventions are as follows:
Each commit message consists of a header, a body, and a footer.
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and must conform to the Commit Message Header format. The header
cannot be longer than 72 characters.
The body is mandatory for all commits except for those of type "docs". When the body is present it must be at least 20
characters long and must conform to the Commit Message Body format.
The footer is optional. The Commit Message Footer format describes what the footer is used
for, and the structure it must have.
<type>(<scope>): <summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: api|autheliabot|authentication|authorization|buildkite|bundler|clock|
│ cmd|codecov|commands|configuration|deps|docker|duo|expression|go|
│ golangci-lint|handlers|lefthook|logging|metrics|middlewares|mocks|
│ model|notification|npm|ntp|oidc|random|regulation|renovate|reviewdog|
│ server|service|session|storage|suites|templates|totp|utils|web|
│ webauthn
│
└─⫸ Commit Type: build|ci|docs|feat|fix|i18n|perf|refactor|release|revert|test
The <type> and <summary> fields are mandatory, the (<scope>) field is optional.
The scope should be the name of the package affected (as perceived by the person reading the changelog generated from commit messages).
There are currently a few exceptions to the "use package name" rule:
api: used for changes that change the openapi specificationcmd: used for changes to the authelia|authelia-gen|authelia-scripts|authelia-suites top level binariesweb: used for changes to the React based frontendtest, refactor and changes that are done across multiple packages
(e.g. test: add missing unit tests) and for docs changes that are not related to a specific package
(e.g. docs: fix typo in tutorial).Use the summary field to provide a succinct description of the change:
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
Explain the motivation for the change in the commit message body. This commit message should explain why you are making the change. You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
The footer can contain information about breaking changes and is also the place to reference GitHub issues and other PRs that this commit closes or is related to.
BREAKING CHANGE: <breaking change summary>
<BLANK LINE>
<breaking change description + migration instructions>
<BLANK LINE>
<BLANK LINE>
Fixes #<issue number>
Signed-off-by: <AUTHOR>
Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
If the commit reverts a previous commit, it should begin with revert:, followed by the header of the reverted commit.
The content of the commit message body should contain:
This reverts commit <SHA>,fix(logging): disable colored logging outputs when file is specified
In some scenarios if a user has a log_file_path specified and a TTY seems to be detected this causes terminal coloring outputs to be written to the file.
This in turn will cause issues when attempting to utilize the log with the provided fail2ban regexes.
We now override any TTY detection/logging treatments and disable coloring/removal of the timestamp when a user is utilizing the text based logger to a file.
Fixes #1480.
Signed-off-by: John Smith <[email protected]>
This document is based on AngularJS Git Commit Message Format.