summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-15 03:11:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-15 03:11:57 +0000
commit1b5891ee8ce8adc6877c462ea292eaee3c4ab30b (patch)
tree6773287f5bcf34597f131c64588c285c304f1301 /app/services
parent25c9c07a16a8100809542eb209df4902f5ef427c (diff)
downloadgitlab-ce-1b5891ee8ce8adc6877c462ea292eaee3c4ab30b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/notes/create_service.rb3
-rw-r--r--app/services/notes/destroy_service.rb3
-rw-r--r--app/services/notes/update_service.rb3
-rw-r--r--app/services/system_notes/issuables_service.rb4
4 files changed, 9 insertions, 4 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index 90edeacf633..b7e6a50fa5c 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -147,7 +147,8 @@ module Notes
end
def track_note_creation_usage_for_issues(note)
- Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_added_action(author: note.author)
+ Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_added_action(author: note.author,
+ project: project)
end
def track_note_creation_usage_for_merge_requests(note)
diff --git a/app/services/notes/destroy_service.rb b/app/services/notes/destroy_service.rb
index c25b1ab0379..eda8bbcbc2e 100644
--- a/app/services/notes/destroy_service.rb
+++ b/app/services/notes/destroy_service.rb
@@ -15,7 +15,8 @@ module Notes
private
def track_note_removal_usage_for_issues(note)
- Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_removed_action(author: note.author)
+ Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_removed_action(author: note.author,
+ project: project)
end
def track_note_removal_usage_for_merge_requests(note)
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb
index 04fc4c7c944..2dae76feb0b 100644
--- a/app/services/notes/update_service.rb
+++ b/app/services/notes/update_service.rb
@@ -86,7 +86,8 @@ module Notes
end
def track_note_edit_usage_for_issues(note)
- Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_edited_action(author: note.author)
+ Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_comment_edited_action(author: note.author,
+ project: project)
end
def track_note_edit_usage_for_merge_requests(note)
diff --git a/app/services/system_notes/issuables_service.rb b/app/services/system_notes/issuables_service.rb
index d2c6e9890db..1c724df44da 100644
--- a/app/services/system_notes/issuables_service.rb
+++ b/app/services/system_notes/issuables_service.rb
@@ -327,7 +327,9 @@ module SystemNotes
cross_reference = noteable_ref.to_reference(project)
body = "cloned #{direction} #{cross_reference}"
- issue_activity_counter.track_issue_cloned_action(author: author) if noteable.is_a?(Issue) && direction == :to
+ if noteable.is_a?(Issue) && direction == :to
+ issue_activity_counter.track_issue_cloned_action(author: author, project: project)
+ end
create_note(NoteSummary.new(noteable, project, author, body, action: 'cloned', created_at: created_at))
end