Ignore label and assignment actions

pull/6827/head
Jonas Heinrich 9 years ago committed by kgalli
parent e67c344174
commit 75aa22dd31
  1. 6
      lib/open_project/github_integration/notification_handlers.rb

@ -35,8 +35,10 @@ module OpenProject::GithubIntegration
# repository: <the repository in action> # repository: <the repository in action>
# } # }
def self.pull_request(payload) def self.pull_request(payload)
# Don't add comments on new pushes to the pull request # Don't add comments on new pushes to the pull request => ignore synchronize.
return if payload['action'] == 'synchronize' # Don't add comments about assignments and labels either.
ignored_actions = %w['synchronize' 'assigned' 'unassigned' 'labeled' 'unlabeled']
return if ignored_actions.include? payload['action']
comment_on_referenced_work_packages payload['pull_request']['body'], payload comment_on_referenced_work_packages payload['pull_request']['body'], payload
end end

Loading…
Cancel
Save