Skip to content

Instantly share code, notes, and snippets.

View raouldc's full-sized avatar

Raoul D'Cunha raouldc

View GitHub Profile
@raouldc
raouldc / commit-msg
Last active October 20, 2022 07:02 — forked from williamdenton/commit-msg
Git hooks
#!/bin/sh
commit_regex='(([[:upper:]]*\-[0-9]*)|fixup!)'
error_msg="Aborting commit. Your commit message is missing a JIRA ticket"
if ! grep -iqE "$commit_regex" "$1";
then
echo "$error_msg" >&2
exit 1