Skip to content

Commit baa7fa2

Browse files
committed
(maint) Update commit check
This commit updates the commits Rake check to include commit summaries that begin with the Puppet Agent (PA) Jira project and removes references to a non-existent CONTRIBUTION.md.
1 parent e18d8b0 commit baa7fa2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

rakelib/commits.rake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
desc "verify that commit messages match CONTRIBUTING.md requirements"
1+
desc "verify that commit summaries are properly formatted"
22
task(:commits) do
33
# This rake task looks at the summary from every commit from this branch not
44
# in the branch targeted for a PR.
@@ -7,16 +7,15 @@ task(:commits) do
77
%x{git log --no-merges --pretty=%s #{commit_range}}.each_line do |commit_summary|
88
# This regex tests for the currently supported commit summary tokens.
99
# The exception tries to explain it in more full.
10-
if /^Release prep|\((maint|packaging|doc|docs|modules-\d+)\)|revert/i.match(commit_summary).nil?
11-
raise "\n\n\n\tThis commit summary didn't match CONTRIBUTING.md guidelines:\n" \
12-
"\n\t\t#{commit_summary}\n" \
13-
"\tThe commit summary (i.e. the first line of the commit message) should start with one of:\n" \
14-
"\t\t(MODULES-<digits>) # this is most common and should be a ticket at tickets.puppet.com\n" \
10+
if /^Release prep|\((maint|packaging|doc|docs|modules|pa-\d+)\)|revert/i.match(commit_summary).nil?
11+
raise "\n\n\n\tPlease make sure that your commit summary (i.e. the first line of the commit message) starts with one of the following:\n" \
12+
"\t\t(PA-<digits>)\n" \
13+
"\t\t(MODULES-<digits>)\n" \
1514
"\t\t(docs)\n" \
1615
"\t\t(docs)(DOCUMENT-<digits>)\n" \
1716
"\t\t(packaging)\n"
1817
"\t\t(maint)\n" \
19-
"\t\tRelease prep v <tag>\n" \
18+
"\t\tRelease prep v<tag>\n" \
2019
"\n\tThis test for the commit summary is case-insensitive.\n\n\n"
2120
else
2221
puts "#{commit_summary}"

0 commit comments

Comments
 (0)