Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/issues')
-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