Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-08-20 19:05:58 +0300
committerDouwe Maan <douwe@gitlab.com>2019-08-20 19:05:58 +0300
commit011c5cebfcdf9c3911d061fef51ed689a83bfc91 (patch)
tree0ea967a1cc20e9518fdfdc2608e4e0e9dcc9423d /lib
parent31b508e820376713131c6c3ac459f86377d45b06 (diff)
parent71691d935e849196cb93e0be101ecbd3e9c245ef (diff)
Merge branch 'bvl-mr-commit-note-counter' into 'master'
Count notes for commits and merge requests See merge request gitlab-org/gitlab-ce!31912
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/usage_data_counters/note_counter.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/usage_data_counters/note_counter.rb b/lib/gitlab/usage_data_counters/note_counter.rb
index e93a0bcfa27..672450ec82b 100644
--- a/lib/gitlab/usage_data_counters/note_counter.rb
+++ b/lib/gitlab/usage_data_counters/note_counter.rb
@@ -4,7 +4,7 @@ module Gitlab::UsageDataCounters
class NoteCounter < BaseCounter
KNOWN_EVENTS = %w[create].freeze
PREFIX = 'note'
- COUNTABLE_TYPES = %w[Snippet].freeze
+ COUNTABLE_TYPES = %w[Snippet Commit MergeRequest].freeze
class << self
def redis_key(event, noteable_type)
@@ -24,9 +24,9 @@ module Gitlab::UsageDataCounters
end
def totals
- {
- snippet_comment: read(:create, 'Snippet')
- }
+ COUNTABLE_TYPES.map do |countable_type|
+ [:"#{countable_type.underscore}_comment", read(:create, countable_type)]
+ end.to_h
end
private