diff options
Diffstat (limited to 'lib/gitlab/cycle_analytics/summary/group/deploy.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/summary/group/deploy.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/gitlab/cycle_analytics/summary/group/deploy.rb b/lib/gitlab/cycle_analytics/summary/group/deploy.rb deleted file mode 100644 index 11a9152cf0c..00000000000 --- a/lib/gitlab/cycle_analytics/summary/group/deploy.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module CycleAnalytics - module Summary - module Group - class Deploy < Group::Base - include GroupProjectsProvider - - def title - n_('Deploy', 'Deploys', value) - end - - def value - @value ||= find_deployments - end - - private - - def find_deployments - deployments = Deployment.joins(:project).merge(Project.inside_path(group.full_path)) - deployments = deployments.where(projects: { id: options[:projects] }) if options[:projects] - deployments = deployments.where("deployments.created_at > ?", options[:from]) - deployments = deployments.where("deployments.created_at < ?", options[:to]) if options[:to] - deployments.success.count - end - end - end - end - end -end |