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

merge_request_widget_extension_counter.rb « usage_data_counters « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dafc36ab7ce80d8187d14996dc99fa9f9963aeac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  module UsageDataCounters
    class MergeRequestWidgetExtensionCounter < BaseCounter
      KNOWN_EVENTS = %w[view full_report_clicked expand expand_success expand_warning expand_failed].freeze
      PREFIX = 'i_code_review_merge_request_widget'
      WIDGETS = %w[accessibility code_quality status_checks terraform test_summary metrics].freeze

      class << self
        private

        def known_events
          self::WIDGETS.product(self::KNOWN_EVENTS).map { |name_parts| name_parts.join('_count_') }
        end
      end
    end
  end
end