We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1a579aa + 9ed7fb9 commit 442c8f8Copy full SHA for 442c8f8
1 file changed
.githooks/commit-msg
@@ -0,0 +1,11 @@
1
+#!/usr/bin/env ruby
2
+
3
+message_file = ARGV[0]
4
+message = File.read(message_file)
5
6
+$grammar_regex = Regexp.new('^:(memo|art|racehorse|non-potable_water|bug|fire|green_heart|white_check_mark|lock|arrow_up|arrow_down|shirt):\s[A-Z][\w\d\s]*[\w\d]\.(\s(Related to)[#\w\d\s]*[\w\d]\.)?$')
7
8
+if !$grammar_regex.match(message)
9
+ puts "Your message does not match with the rules defined in the CONTRIBUTING.md."
10
+ exit 1
11
+end
0 commit comments