2016-11-16 06:01:10 -05:00
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
2016-12-02 11:09:29 -05:00
|
|
|
class CodeEventFetcher < BaseEventFetcher
|
2016-11-18 06:05:29 -05:00
|
|
|
include MergeRequestAllowed
|
|
|
|
|
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],
|
|
|
|
mr_table[:state],
|
|
|
|
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)
|
2017-01-27 08:37:14 -05:00
|
|
|
AnalyticsMergeRequestSerializer.new(project: @project).represent(event)
|
2016-11-17 12:00:37 -05:00
|
|
|
end
|
2016-11-16 06:01:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|