-
-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: introduce conventional-commits (#1234)
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Commits | ||
|
||
Using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) is strongly recommended and might be enforced in future. | ||
|
||
### Examples | ||
|
||
``` | ||
docs: correct spelling of CHANGELOG | ||
feat: allow provided config object to extend other configs | ||
feat(lang): added polish language | ||
``` | ||
|
||
### Git hook | ||
|
||
Use this git hook to auto-check your commit messages. Save the following snippet into `.git/hooks/commit-msg` | ||
|
||
``` | ||
#!/bin/sh | ||
if ! grep -qE "^(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\((common|core|crypto|legacy|python|storage|tools|vendor)\))?: " "$1" ; then | ||
echo "Conventional Commits validation failed" | ||
exit 1 | ||
fi | ||
``` | ||
|
||
If you want to bypass commit-msg hook check, you may always use | ||
|
||
``` | ||
git commit -m "foobar" --no-verify | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters