Last active
March 27, 2019 11:14
-
-
Save qapquiz/76786091286b3e759103944c6ab4fc23 to your computer and use it in GitHub Desktop.
commit-msg git hook that will use commitlint to enforce commit message to use conventional commit style
This file contains hidden or 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
#!/bin/sh | |
temp_file_that_contain_commit_message=$1 | |
commit_message=$(cat "$temp_file_that_contain_commit_message") | |
echo "$commit_message" | commitlint | |
commitlint_status=$? | |
if [ $commitlint_status -ne 0 ] ; then | |
echo "commit message should be in angular format" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment