2018-11-05 23:45:35 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-16 06:01:10 -05:00
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
2016-12-02 11:09:29 -05:00
|
|
|
class CodeEventFetcher < BaseEventFetcher
|
2019-06-17 09:17:18 -04:00
|
|
|
include CodeHelper
|
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
def initialize(*args)
|
|
|
|
@projections = [mr_table[:title],
|
|
|
|
mr_table[:iid],
|
|
|
|
mr_table[:id],
|
|
|
|
mr_table[:created_at],
|
2019-11-19 07:06:00 -05:00
|
|
|
mr_table[:state_id],
|
2019-08-05 17:15:00 -04:00
|
|
|
mr_table[:author_id]]
|
2016-12-02 11:09:29 -05:00
|
|
|
@order = mr_table[:created_at]
|
2016-11-17 07:22:27 -05:00
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
super(*args)
|
|
|
|
end
|
|
|
|
|
2016-12-02 11:09:29 -05:00
|
|
|
private
|
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
def serialize(event)
|
2019-07-04 10:42:31 -04:00
|
|
|
AnalyticsMergeRequestSerializer.new(serialization_context).represent(event)
|
2016-11-17 12:00:37 -05:00
|
|
|
end
|
2017-07-11 14:29:33 -04:00
|
|
|
|
|
|
|
def allowed_ids_finder_class
|
|
|
|
MergeRequestsFinder
|
|
|
|
end
|
2016-11-16 06:01:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|