summaryrefslogtreecommitdiff
path: root/app/finders/packages/package_finder.rb
blob: e482a0503f00dac2d0a3c7c26b0668d563c35e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true
module Packages
  class PackageFinder
    def initialize(project, package_id)
      @project = project
      @package_id = package_id
    end

    def execute
      @project
        .packages
        .preload_pipelines
        .including_project_route
        .including_tags
        .displayable
        .find(@package_id)
    end
  end
end