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