From 9b691688583ad46d5608320ec64873dd2eb9a647 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 21 Nov 2016 14:09:26 +0100 Subject: refactored a couple of things based on feedback --- app/models/cycle_analytics.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/models') 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 -- cgit v1.2.1