Created
March 18, 2018 06:32
-
-
Save Hafiz-Waleed-Hussain/159928ce7d0901a3f22f53830143da65 to your computer and use it in GitHub Desktop.
Commit Message Hook Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
msg=`head -n 1 $1` | |
if echo $msg | egrep -qv '(Android-\d{3,4}.{20,})'; then | |
echo "[Message Format] Your message is not formatted correctly. Correct message format\n | |
#Ticket Number - Minimum 20 or more Character \n | |
like #Android-123 Bug fixed for login issue" | |
exit 1; | |
fi |
ok let me try it later and get back to you
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its mean commit hook is working but logic has some issue. Can you try to add simple validation As a minimum 5 characters required?