Git
1
Вклад в тег
#!/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