Skip to content
Snippets Groups Projects
Commit 7927f592 authored by Adam Laskowski's avatar Adam Laskowski
Browse files

SSDM-13365: Added a simple git message hook script to be used by development team.

parent dedd640e
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
#!/bin/sh
#
# A simple hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit.
#
# To enable this hook, move it to .git/hooks directory and make it executable.
# Remember to keep the name of the file as "commit-msg".
commit_regex='(SSDM-[0-9]+:|merge|rebase)'
error_msg="Aborting commit. Your commit message is missing an issue number ('SSDM-XXXX:')"
if ! grep -iqE "$commit_regex" "$1"; then
echo "$error_msg" >&2
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment