diff options
author | James Lopez <james@jameslopez.es> | 2016-12-01 13:21:24 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 13:32:55 +0300 |
commit | b8056669849729cab5700466a7fae6dc6b2743b2 (patch) | |
tree | 788c5a8bf535b48d3e1b8593f6be8a45205e317e /lib/gitlab/cycle_analytics/review_stage.rb | |
parent | 8183e848648bc737e4a09f76f4f55ee1cf106b26 (diff) |
refactor cycle analytics - updated based on MR feedback
Diffstat (limited to 'lib/gitlab/cycle_analytics/review_stage.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/review_stage.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/gitlab/cycle_analytics/review_stage.rb b/lib/gitlab/cycle_analytics/review_stage.rb index 4159ba5d70d..c7b5e34e16a 100644 --- a/lib/gitlab/cycle_analytics/review_stage.rb +++ b/lib/gitlab/cycle_analytics/review_stage.rb @@ -1,16 +1,14 @@ module Gitlab module CycleAnalytics class ReviewStage < BaseStage - def initialize(*args) - super(*args) - - @description = "Time between merge request creation and merge/close" + def description + "Time between merge request creation and merge/close" end def median - @fetcher.calculate_metric(:review, - MergeRequest.arel_table[:created_at], - MergeRequest::Metrics.arel_table[:merged_at]) + @fetcher.median(:review, + MergeRequest.arel_table[:created_at], + MergeRequest::Metrics.arel_table[:merged_at]) end end end |