summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/production_event_fetcher.rb
blob: 404b246081498d1bb8a2ed891f4fcf49bd5d37a1 (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
29
30
31
# frozen_string_literal: true

module Gitlab
  module CycleAnalytics
    class ProductionEventFetcher < BaseEventFetcher
      include ProductionHelper

      def initialize(*args)
        @projections = [issue_table[:title],
                        issue_table[:iid],
                        issue_table[:id],
                        issue_table[:created_at],
                        issue_table[:author_id],
                        projects_table[:name],
                        routes_table[:path]]

        super(*args)
      end

      private

      def serialize(event)
        AnalyticsIssueSerializer.new(serialization_context).represent(event)
      end

      def allowed_ids_finder_class
        IssuesFinder
      end
    end
  end
end