Created
June 25, 2011 09:51
-
-
Save flyerhzm/1046324 to your computer and use it in GitHub Desktop.
git commit-msg hook to promise containing jira ticket
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
################################################################################### | |
# please add the following codes to .git/hooks/commit-msg, make it be an executable | |
################################################################################### | |
#!/usr/bin/env ruby | |
commit_message = File.read ARGV[0] | |
unless commit_message =~ /ENGINEERING-\d+/ | |
puts "ERROR: please add jira ticket on git commit message" | |
exit(1) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment