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

branch_names_finder.rb « repositories « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5bb67425aa54180b9f97496675a5238884bf64f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Repositories
  class BranchNamesFinder
    attr_reader :repository, :params

    def initialize(repository, params = {})
      @repository = repository
      @params = params
    end

    def execute
      return unless search

      repository.search_branch_names(search)
    end

    private

    def search
      @params[:search].presence
    end
  end
end