diff options
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/create_service.rb | 5 | ||||
-rw-r--r-- | app/services/notes/destroy_service.rb | 5 | ||||
-rw-r--r-- | app/services/notes/update_service.rb | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb index 9fffb6c372b..04b7fba207b 100644 --- a/app/services/notes/create_service.rb +++ b/app/services/notes/create_service.rb @@ -75,6 +75,7 @@ module Notes end track_note_creation_usage_for_issues(note) if note.for_issue? + track_note_creation_usage_for_merge_requests(note) if note.for_merge_request? end def do_commands(note, update_params, message, only_commands) @@ -119,5 +120,9 @@ module Notes def track_note_creation_usage_for_issues(note) Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_added_action(author: note.author) end + + def track_note_creation_usage_for_merge_requests(note) + Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter.track_create_comment_action(note: note) + end end end diff --git a/app/services/notes/destroy_service.rb b/app/services/notes/destroy_service.rb index 2b6ec47eaef..85f54a39add 100644 --- a/app/services/notes/destroy_service.rb +++ b/app/services/notes/destroy_service.rb @@ -9,6 +9,7 @@ module Notes clear_noteable_diffs_cache(note) track_note_removal_usage_for_issues(note) if note.for_issue? + track_note_removal_usage_for_merge_requests(note) if note.for_merge_request? end private @@ -16,6 +17,10 @@ module Notes def track_note_removal_usage_for_issues(note) Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_removed_action(author: note.author) end + + def track_note_removal_usage_for_merge_requests(note) + Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter.track_remove_comment_action(note: note) + end end end diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb index 37872f7fbdb..857ffbb6965 100644 --- a/app/services/notes/update_service.rb +++ b/app/services/notes/update_service.rb @@ -15,6 +15,7 @@ module Notes end track_note_edit_usage_for_issues(note) if note.for_issue? + track_note_edit_usage_for_merge_requests(note) if note.for_merge_request? only_commands = false @@ -95,6 +96,10 @@ module Notes def track_note_edit_usage_for_issues(note) Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_edited_action(author: note.author) end + + def track_note_edit_usage_for_merge_requests(note) + Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter.track_edit_comment_action(note: note) + end end end |