gitlab-org--gitlab-foss/lib/gitlab/cycle_analytics/test_helper.rb
Gosia Ksionek 976b8b5391 Fix plan stage query
Fix plan stage query and the way it is displayed
2019-06-17 13:17:18 +00:00

21 lines
425 B
Ruby

# frozen_string_literal: true
module Gitlab
module CycleAnalytics
module TestHelper
def stage_query(project_ids)
if branch
super(project_ids).where(build_table[:ref].eq(branch))
else
super(project_ids)
end
end
private
def branch
@branch ||= @options[:branch] # rubocop:disable Gitlab/ModuleWithInstanceVariables
end
end
end
end