Skip to content

Commit 322fa7e

Browse files
committed
Merge pull request #4048 from mboersma/commit-hook-warning
fix(contrib): warn if commit subject is too long
2 parents 6bc5a0b + b1af37e commit 322fa7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

contrib/util/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
set -eo pipefail
77

88
RED=$(tput setaf 1)
9+
YELLOW=$(tput setaf 3)
910
NORMAL=$(tput sgr0)
1011
subject_regex="^(feat|fix|docs|style|ref|test|chore)\(.+\): [\w\s\d]*"
1112
capital_regex="^.+\): [a-z][\w\s\d]*"
@@ -51,10 +52,9 @@ if ! [[ $SUBJECT =~ $capital_regex ]]; then
5152
fi
5253

5354
if [[ ${#SUBJECT} -gt 50 ]]; then
54-
echo "${RED}ERROR - Subject can't be longer than 50 characters."
55+
echo "${YELLOW}WARNING - Subject shouldn't be longer than 50 characters."
5556
echo ""
5657
echo "Read more at http://docs.deis.io/en/latest/contributing/standards/$NORMAL"
57-
exit 1
5858
fi
5959

6060
if [[ ${#MESSAGE[2]} -gt 0 ]]; then

0 commit comments

Comments
 (0)