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],
|
|
|
|
mr_table[:state],
|
|
|
|
mr_table[:author_id]]
|
|
|
|
@order = mr_table[:created_at]
|
|
|
|
|
|
|
|
super(*args)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def serialize(event)
|
2019-09-30 21:07:59 +05:30
|
|
|
AnalyticsMergeRequestSerializer.new(project: project).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
|