Created
November 8, 2017 13:52
-
-
Save Ashaba/015665b882bd19a6ce9e8aa861f6b5a5 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
$regex = /\((\w+)\):/ | |
if !$regex.match(message) | |
puts "[POLICY] Your message is not formatted correctly" | |
puts "[STANDARD] Your message should be in the format: ‘feat(module): commit message’ " | |
exit 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment