debian-mirror-gitlab/lib/gitlab/cycle_analytics/code_event_fetcher.rb

32 lines
728 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Gitlab
module CycleAnalytics
class CodeEventFetcher < BaseEventFetcher
2019-09-04 21:01:54 +05:30
include CodeHelper
2017-08-17 22:00:37 +05:30
def initialize(*args)
@projections = [mr_table[:title],
mr_table[:iid],
mr_table[:id],
mr_table[:created_at],
2020-01-01 13:55:28 +05:30
mr_table[:state_id],
2017-08-17 22:00:37 +05:30
mr_table[:author_id]]
@order = mr_table[:created_at]
super(*args)
end
private
def serialize(event)
2019-10-12 21:52:04 +05:30
AnalyticsMergeRequestSerializer.new(serialization_context).represent(event)
2017-08-17 22:00:37 +05:30
end
2018-03-17 18:26:18 +05:30
def allowed_ids_finder_class
MergeRequestsFinder
end
2017-08-17 22:00:37 +05:30
end
end
end