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/workers/new_issue_worker.rb')
-rw-r--r--app/workers/new_issue_worker.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/workers/new_issue_worker.rb b/app/workers/new_issue_worker.rb
index 0e7f11debd2..80f9e922456 100644
--- a/app/workers/new_issue_worker.rb
+++ b/app/workers/new_issue_worker.rb
@@ -15,13 +15,14 @@ class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
attr_reader :issuable_class
- def perform(issue_id, user_id, issuable_class = 'Issue')
+ # TODO: Add skip_notifications argument to the invocations of the worker in the next release (16.9)
+ def perform(issue_id, user_id, issuable_class = 'Issue', skip_notifications = false)
@issuable_class = issuable_class.constantize
return unless objects_found?(issue_id, user_id)
::EventCreateService.new.open_issue(issuable, user)
- ::NotificationService.new.new_issue(issuable, user)
+ ::NotificationService.new.new_issue(issuable, user) unless skip_notifications
issuable.create_cross_references!(user)