Skip to content
Snippets Groups Projects
Commit 458d92e8 authored by Jakub Zienkiewicz's avatar Jakub Zienkiewicz Committed by Wes Gurney
Browse files

notify commit author of new notes

parent 48831178
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
Loading
Loading
@@ -107,12 +107,6 @@ class NotificationService
 
opts = { noteable_type: note.noteable_type, project_id: note.project_id }
 
if note.commit_id.present?
opts.merge!(commit_id: note.commit_id)
else
opts.merge!(noteable_id: note.noteable_id)
end
target = note.noteable
if target.respond_to?(:participants)
recipients = target.participants
Loading
Loading
@@ -120,6 +114,13 @@ class NotificationService
recipients = note.mentioned_users
end
 
if note.commit_id.present?
opts.merge!(commit_id: note.commit_id)
recipients << note.commit_author
else
opts.merge!(noteable_id: note.noteable_id)
end
# Get users who left comment in thread
recipients = recipients.concat(User.where(id: Note.where(opts).pluck(:author_id)))
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment