Skip to content

Commit 96b93ba

Browse files
committed
fix(validate-commit): Update the regexp
The current regexp was sometime refusing commit messages that are valid (see https://travis-ci.org/algolia/instantsearch.js/builds/85530333) I've simply removed the `?:` and added a check on the `: `, and this seems to work better. I still have no idea why some commits where ok and some not. If anyone has a guess...?
1 parent c27a363 commit 96b93ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/validate-commit-msgs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for sha in `git log --format=oneline "$RANGE" | cut '-d ' -f1`; do
3535
EXIT=2
3636
elif echo $FIRST_LINE | grep -qE '^Merge (?:pull request|branch)'; then
3737
echo "OK (merge)"
38-
elif echo $FIRST_LINE | grep -qE '^(?:feat|fix|docs|style|refactor|perf|test|chore|revert)\(.+\).*'; then
38+
elif echo $FIRST_LINE | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore|revert)\(.+\): .*'; then
3939
echo "OK"
4040
else
4141
echo "KO (format): $FIRST_LINE"

0 commit comments

Comments
 (0)