Browse Source

chore: limit scope of commit messages to dozen characters

reviewable/pr3574/r4
Zetok Zalbavar 9 years ago
parent
commit
34aa9051e3
No known key found for this signature in database
GPG Key ID: C953D3880212068A
  1. 3
      CONTRIBUTING.md
  2. 2
      verify-commit-messages.sh

3
CONTRIBUTING.md

@ -105,6 +105,9 @@ The scope could be anything specifying place of the commit change. For example @@ -105,6 +105,9 @@ The scope could be anything specifying place of the commit change. For example
`$location`, `$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`,
`ngView`, etc.
Since people were abusing length of the scope, it's limited to 12 characters.
If you're running into the limit, you're doing it wrong.
#### Subject
The subject contains succinct description of the change:

2
verify-commit-messages.sh

@ -31,7 +31,7 @@ echo "" # ← formatting @@ -31,7 +31,7 @@ echo "" # ← formatting
# Conform, /OR ELSE/.
if git log --format=format:'%s' "$ARG" | \
grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.+\))?:.{1,68})|(Merge pull request #[[:digit:]]{1,10})$'
grep -v -E '^((feat|fix|docs|style|refactor|perf|revert|test|chore)(\(.{,12}\))?:.{1,68})|(Merge pull request #[[:digit:]]{1,10})$'
then
echo ""
echo "Above ↑ commits don't conform to commit message format:"

Loading…
Cancel
Save