diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-25 13:47:48 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-25 13:47:48 +0200 |
commit | 80daf9a7774fd757a8838f0b49b6384ec7ceb724 (patch) | |
tree | c77e714990afe9dae6ebb1adc85e0aea7bd49f5b | |
parent | 8bbac4576b7c75f47a3a940dc5fb6b1217a3c397 (diff) | |
download | gitlab-ce-80daf9a7774fd757a8838f0b49b6384ec7ceb724.tar.gz |
Use current_user for Notification#merge_mr
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/services/merge_requests/auto_merge_service.rb | 2 | ||||
-rw-r--r-- | app/services/merge_requests/merge_service.rb | 2 | ||||
-rw-r--r-- | app/services/notification_service.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/services/merge_requests/auto_merge_service.rb b/app/services/merge_requests/auto_merge_service.rb index d60d61ed54a..9c9117f4687 100644 --- a/app/services/merge_requests/auto_merge_service.rb +++ b/app/services/merge_requests/auto_merge_service.rb @@ -12,7 +12,7 @@ module MergeRequests merge_request.author_id_of_changes = current_user.id merge_request.merge - notification.merge_mr(merge_request) + notification.merge_mr(merge_request, current_user) create_merge_event(merge_request) execute_project_hooks(merge_request) diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index 1d5af04cdbb..80487f661e0 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -10,7 +10,7 @@ module MergeRequests merge_request.author_id_of_changes = current_user.id merge_request.merge - notification.merge_mr(merge_request) + notification.merge_mr(merge_request, current_user) create_merge_event(merge_request) execute_project_hooks(merge_request) diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 9edb7fd3e31..6fda9868aa5 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -86,12 +86,12 @@ class NotificationService # * merge_request assignee if their notification level is not Disabled # * project team members with notification level higher then Participating # - def merge_mr(merge_request) + def merge_mr(merge_request, current_user) recipients = reject_muted_users([merge_request.author, merge_request.assignee], merge_request.target_project) recipients = recipients.concat(project_watchers(merge_request.target_project)).uniq recipients.each do |recipient| - mailer.merged_merge_request_email(recipient.id, merge_request.id, merge_request.author_id_of_changes) + mailer.merged_merge_request_email(recipient.id, merge_request.id, current_user.id) end end |