Skip to content

Commit

Permalink
Merge pull request alibaba#1609 from Hanks10100/dev-hotfix-commit-log
Browse files Browse the repository at this point in the history
Fix the regular expression of commit message
  • Loading branch information
Jinjiang authored Nov 10, 2016
2 parents 32def33 + 5f64099 commit 5a229b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/commit-msg.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash

# Validate commit log
commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] [^\n]{1,50}'
commit_regex='^Merge.+|[+*-] \[(android|ios|jsfm|html5|component|doc|website|example|test|all)\] .{1,50}'

if ! grep -iqE "$commit_regex" "$1"; then
echo "ERROR: commit log format is not correct!"
echo "See https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#commit-log"
exit 1
fi
# FIXME no effect after editor (like vim) exits
# FIXME no effect after editor (like vim) exits
# ISSUE merge or conflict

0 comments on commit 5a229b6

Please sign in to comment.