lib/tutter/action/sppuppet.rb in tutter-sppuppet-1.2.3 vs lib/tutter/action/sppuppet.rb in tutter-sppuppet-1.2.4
- old
+ new
@@ -24,11 +24,14 @@
if @data['action'] != 'created'
# Not a new comment, ignore
return 200, 'not a new comment, skipping'
end
- pull_request_id = @data['issue']['number']
+ if @data['sender']['login'] == @client.user.login
+ return 200, 'Skipping own comment'
+ end
+ pull_request_id = @data['issue']['number']
merge_command = MERGE_COMMENT.match(@data['comment']['body'])
return 200, 'Not a merge comment' unless merge_command
return maybe_merge(pull_request_id, true, @data['sender']['login'])