diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-12 06:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-12 06:08:48 +0300 |
commit | bb01b338bfbc6e17996696145e6c495694b8f745 (patch) | |
tree | a470ea44dca6b2975fe5b62f07558286652e8140 /app/services/notes | |
parent | 7abe3b23d1dc3267ac7ac4e1955c78c97d06485c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/post_process_service.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/services/notes/post_process_service.rb b/app/services/notes/post_process_service.rb index c9375fe14a1..9465b5218b0 100644 --- a/app/services/notes/post_process_service.rb +++ b/app/services/notes/post_process_service.rb @@ -36,10 +36,19 @@ module Notes return unless note.project note_data = hook_data - hooks_scope = note.confidential?(include_noteable: true) ? :confidential_note_hooks : :note_hooks + is_confidential = note.confidential?(include_noteable: true) + hooks_scope = is_confidential ? :confidential_note_hooks : :note_hooks note.project.execute_hooks(note_data, hooks_scope) note.project.execute_integrations(note_data, hooks_scope) + + return unless Feature.enabled?(:group_mentions, note.project) + + execute_group_mention_hooks(note, note_data, is_confidential) + end + + def execute_group_mention_hooks(note, note_data, is_confidential) + Integrations::GroupMentionService.new(note, hook_data: note_data, is_confidential: is_confidential).execute end end end |