Skip to content

Instantly share code, notes, and snippets.

@Ashaba
Created November 8, 2017 13:52
Show Gist options
  • Save Ashaba/015665b882bd19a6ce9e8aa861f6b5a5 to your computer and use it in GitHub Desktop.
Save Ashaba/015665b882bd19a6ce9e8aa861f6b5a5 to your computer and use it in GitHub Desktop.
#!/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