Skip to content

Instantly share code, notes, and snippets.

@rockpapergoat
Created November 1, 2013 15:11
Show Gist options
  • Save rockpapergoat/7266898 to your computer and use it in GitHub Desktop.
Save rockpapergoat/7266898 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
$regex = /^name:\s\w+$/
if !$regex.match(message)
puts "[POLICY] Commit message requires: name: <your name>"
exit 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment