webpack commit msg linter, fixes SD-1860

test plan:
* should get a webpack comment on patchset 1

Change-Id: I3fcd5d22b2c9d1b1480958e0ea134e4fefaee714
Reviewed-on: https://gerrit.instructure.com/99354
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
This commit is contained in:
Landon Wilkins 2017-01-11 14:02:33 -07:00
parent f248b27fa7
commit cf4a8f61f8
1 changed files with 10 additions and 0 deletions

View File

@ -127,3 +127,13 @@ has_a_test_plan = commit_message =~ /test[ -]plan/i
unless has_a_test_plan
comment "warn", 3, "y u no add test plan? ლ(ಠ益ಠლ)"
end
references_webpack = commit_message =~ /webpack/i
gerrit_topic = ENV["GERRIT_TOPIC"]
has_webpack_topic = gerrit_topic && gerrit_topic =~ /webpack/i
if references_webpack && !has_webpack_topic
comment "warn", 3,
"looks like your commit is webpack related." \
" trigger webpack builds by pushing to the webpack topic:" \
" `git push origin HEAD:refs/for/master/webpack`"
end