lib/tutter/action/sppuppet.rb in tutter-sppuppet-0.0.24 vs lib/tutter/action/sppuppet.rb in tutter-sppuppet-1.0.0
- old
+ new
@@ -94,9 +94,15 @@
# pull request submitter cant +1
unless pr.user.login == i.attrs[:user].attrs[:login]
votes[i.attrs[:user].attrs[:login]] = score
end
end
+
+ match = /^(:poop:|:hankey:|-2)/.match(i.body)
+ if match
+ msg = "Commit cannot be merged so long as a -2 comment appears in the PR."
+ return post_comment(pull_request_id, msg)
+ end
end
return 200, 'No merge comment found' unless merger
num_votes = votes.values.reduce(0) { |a, e| a + e }