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