2019-06-17 09:17:18 -04:00
|
|
|
# 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
|
2019-07-10 07:22:29 -04:00
|
|
|
@branch ||= options[:branch]
|
2019-06-17 09:17:18 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|