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

group_labels_finder.rb « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 903023033edb807f3b52611481669dc334a9cf62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class GroupLabelsFinder
  attr_reader :group, :params

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

  def execute
    group.labels
      .optionally_search(params[:search])
      .order_by(params[:sort])
      .page(params[:page])
  end
end