2020-07-10 11:09:07 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
module Packages
|
|
|
|
class PackageFinder
|
|
|
|
def initialize(project, package_id)
|
|
|
|
@project = project
|
|
|
|
@package_id = package_id
|
|
|
|
end
|
|
|
|
|
|
|
|
def execute
|
|
|
|
@project
|
|
|
|
.packages
|
2021-11-11 22:12:11 -05:00
|
|
|
.preload_pipelines
|
2020-09-03 20:09:08 -04:00
|
|
|
.including_project_route
|
|
|
|
.including_tags
|
2021-05-11 11:10:20 -04:00
|
|
|
.displayable
|
2020-07-10 11:09:07 -04:00
|
|
|
.find(@package_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|