You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if echo "$commit_message" | grep -qE "Merge branch"; then
echo "Commit hook: ignoring branch merge"
exit 0
fi
# versioning scheme
if ! echo "$commit_message" | grep -qE '^((\w+\/)?([A-Z]+[-_])?[0-9]+: )(feat|fix|bugfix|hotfix|docs|style|refactor|perf|test|chore)\(?(?:\w+|\s|\-|_)?\)?:\s\w+'; then
echo "[ERROR]: Aborting commit. Your commit message is invalid: $commit_message"
exit 1
fi
# length scheme
if ! echo "$commit_message" | grep -qE "^.{1,100}$"; then
echo "[ERROR]: Aborting commit. Your commit message is too long: $commit_message"