Skip to content
Snippets Groups Projects
Commit 0dc0c93a authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-773: Fix commit-msg hook for real

parent 56e189f4
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ message_file = ARGV[0]
message = File.read(message_file)
$regex = /^((fixes|task|story|issue)\s)?(#(\d+)|[a-zA-Z]+-(\d)+):/i
if !$regex.match(message)
STDERR.puts("[commit-msg hook] Your commit #{ rev } was rejected!\n"\
STDERR.puts("[commit-msg hook] Your commit was rejected!\n"\
"[commit-msg hook] A commit message must start with a JIRA task ID,\n"\
" or \"task\", \"story\", \"issue\" or \"fixes\", followed by an issue ID.\n"\
"[commit-msg hook] For example: \"Task #42: Fixed bug\" or \"SW-22334: Fixed bug\"\n"\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment