|
|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|