Class: Gitlab::CycleAnalytics::StageSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/cycle_analytics/stage_summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(project, from:, to: nil, current_user:) ⇒ StageSummary

Returns a new instance of StageSummary.


6
7
8
9
10
11
# File 'lib/gitlab/cycle_analytics/stage_summary.rb', line 6

def initialize(project, from:, to: nil, current_user:)
  @project = project
  @from = from
  @to = to
  @current_user = current_user
end

Instance Method Details

#dataObject


13
14
15
16
17
18
# File 'lib/gitlab/cycle_analytics/stage_summary.rb', line 13

def data
  summary = [issue_stats]
  summary << commit_stats if user_has_sufficient_access?
  summary << deploy_stats
  summary << deployment_frequency_stats
end