Skip to content

Commit

Permalink
fix(validate-commit): Update the regexp
Browse files Browse the repository at this point in the history
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...?
  • Loading branch information
pixelastic committed Oct 15, 2015
1 parent c27a363 commit 96b93ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/validate-commit-msgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for sha in `git log --format=oneline "$RANGE" | cut '-d ' -f1`; do
EXIT=2
elif echo $FIRST_LINE | grep -qE '^Merge (?:pull request|branch)'; then
echo "OK (merge)"
elif echo $FIRST_LINE | grep -qE '^(?:feat|fix|docs|style|refactor|perf|test|chore|revert)\(.+\).*'; then
elif echo $FIRST_LINE | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore|revert)\(.+\): .*'; then
echo "OK"
else
echo "KO (format): $FIRST_LINE"
Expand Down

0 comments on commit 96b93ba

Please sign in to comment.