summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-30 19:11:46 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-31 18:34:45 -0300
commit21f10af0956c69b6a5bad6b36b7d6e12e60e7867 (patch)
treeb67fa1c084a144f89559e14b0be5c5a0e7421c76 /app/services
parentdd64f8aaf867516043dbbf559595a0ed9671ab3b (diff)
downloadgitlab-ce-21f10af0956c69b6a5bad6b36b7d6e12e60e7867.tar.gz
Scope hooks thal will run for confidential issues
Diffstat (limited to 'app/services')
-rw-r--r--app/services/issues/base_service.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb
index 241efc44d36..9ea3ce084ba 100644
--- a/app/services/issues/base_service.rb
+++ b/app/services/issues/base_service.rb
@@ -14,11 +14,10 @@ module Issues
end
def execute_hooks(issue, action = 'open')
- return if issue.confidential?
-
- issue_data = hook_data(issue, action)
- issue.project.execute_hooks(issue_data, :issue_hooks)
- issue.project.execute_services(issue_data, :issue_hooks)
+ issue_data = hook_data(issue, action)
+ hooks_scope = issue.confidential? ? :confidential_issue_hooks : :issue_hooks
+ issue.project.execute_hooks(issue_data, hooks_scope)
+ issue.project.execute_services(issue_data, hooks_scope)
end
end
end