Welcome to mirror list, hosted at ThFree Co, Russian Federation.

group_stage_summary.rb « cycle_analytics « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 26eaaf7df8363300ccd4d32193ea99d1b2497be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

module Gitlab
  module CycleAnalytics
    class GroupStageSummary
      attr_reader :group, :current_user, :options

      def initialize(group, options:)
        @group = group
        @current_user = options[:current_user]
        @options = options
      end

      def data
        [serialize(Summary::Group::Issue.new(group: group, current_user: current_user, options: options)),
         serialize(Summary::Group::Deploy.new(group: group, options: options))]
      end

      private

      def serialize(summary_object)
        AnalyticsSummarySerializer.new.represent(summary_object)
      end
    end
  end
end