Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It's decided. Might be useful to someone in the future.
#!/usr/bin/env ruby
branchname = `git branch --no-color 2> /dev/null`[/^\* (.+)/, 1]
if branchname == 'master'
message_file = ARGV[0]
message = File.read(message_file)
$regex = /\#(\d+)/
if !$regex.match(message)
puts "[POLICY] Your message is not formatted correctly"
exit 1
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question