2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
|
|
|
class GroupStageSummary
|
2019-12-26 22:10:19 +05:30
|
|
|
attr_reader :group, :current_user, :options
|
2019-10-12 21:52:04 +05:30
|
|
|
|
|
|
|
def initialize(group, options:)
|
|
|
|
@group = group
|
|
|
|
@current_user = options[:current_user]
|
|
|
|
@options = options
|
|
|
|
end
|
|
|
|
|
|
|
|
def data
|
2019-12-26 22:10:19 +05:30
|
|
|
[serialize(Summary::Group::Issue.new(group: group, current_user: current_user, options: options)),
|
|
|
|
serialize(Summary::Group::Deploy.new(group: group, options: options))]
|
2019-10-12 21:52:04 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def serialize(summary_object)
|
|
|
|
AnalyticsSummarySerializer.new.represent(summary_object)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|