Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_helper.rb « cycle_analytics « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9124d62c7c38fd31ee1ee0494a474cc5449b34a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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]
      end
    end
  end
end