diff options
author | James Lopez <james@jameslopez.es> | 2016-11-21 14:09:26 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-21 14:09:26 +0100 |
commit | 9b691688583ad46d5608320ec64873dd2eb9a647 (patch) | |
tree | dad3a7572fcc6378b355942d7c9a12f883ead213 /app/models/cycle_analytics.rb | |
parent | d747c1c0f974034d71a25edc2c8e525d3657c774 (diff) | |
download | gitlab-ce-9b691688583ad46d5608320ec64873dd2eb9a647.tar.gz |
refactored a couple of things based on feedbackfix/cycle-analytics-permissions
Diffstat (limited to 'app/models/cycle_analytics.rb')
-rw-r--r-- | app/models/cycle_analytics.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/cycle_analytics.rb b/app/models/cycle_analytics.rb index a10e96d53bf..cb8e088d21d 100644 --- a/app/models/cycle_analytics.rb +++ b/app/models/cycle_analytics.rb @@ -1,10 +1,9 @@ class CycleAnalytics STAGES = %i[issue plan code test review staging production].freeze - def initialize(project, from:, user:) + def initialize(project, from:) @project = project @from = from - @user = user @fetcher = Gitlab::CycleAnalytics::MetricsFetcher.new(project: project, from: from, branch: nil) end @@ -12,8 +11,8 @@ class CycleAnalytics @summary ||= Summary.new(@project, from: @from) end - def permissions - Gitlab::CycleAnalytics::Permissions.get(user: @user, project: @project) + def permissions(user:) + Gitlab::CycleAnalytics::Permissions.get(user: user, project: @project) end def issue |