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: 639da9bfee0906721ef8ac31494acc200f86677c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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
        license_compliance
        status_checks
        terraform
        test_summary
        metrics
        security_reports
      ].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