BigW Consortium Gitlab

code_event_fetcher.rb 625 Bytes
Newer Older
1 2
module Gitlab
  module CycleAnalytics
3
    class CodeEventFetcher < BaseEventFetcher
4 5
      include MergeRequestAllowed

6 7 8 9 10 11 12
      def initialize(*args)
        @projections = [mr_table[:title],
                        mr_table[:iid],
                        mr_table[:id],
                        mr_table[:created_at],
                        mr_table[:state],
                        mr_table[:author_id]]
13
        @order = mr_table[:created_at]
14

15 16 17
        super(*args)
      end

18 19
      private

20
      def serialize(event)
21
        AnalyticsMergeRequestSerializer.new(project: @project).represent(event)
22
      end
23 24 25
    end
  end
end