Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # regex to validate in commit msg
- commit_regex='(#[0-9]+|merge)'
- error_msg="Aborting commit. Your commit message is missing either a Issue ('#123') or 'Merge'"
- if ! grep -iqE "$commit_regex" "$1"; then
- echo "$error_msg" >&2
- exit 1
- fi
- chmod +x commit-msg
Add Comment
Please, Sign In to add comment