diff options
Diffstat (limited to 'lib/api/entities/package.rb')
-rw-r--r-- | lib/api/entities/package.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/entities/package.rb b/lib/api/entities/package.rb index b54f0e04a9d..e7153f9bebb 100644 --- a/lib/api/entities/package.rb +++ b/lib/api/entities/package.rb @@ -38,7 +38,8 @@ module API expose :project_path, if: ->(obj, opts) { opts[:group] && Ability.allowed?(opts[:user], :read_project, obj.project) } expose :tags - expose :pipeline, if: ->(package) { package.build_info }, using: Package::Pipeline + expose :pipeline, if: ->(package) { package.original_build_info }, using: Package::Pipeline + expose :pipelines, if: ->(package) { package.pipelines.present? }, using: Package::Pipeline expose :versions, using: ::API::Entities::PackageVersion, unless: ->(_, opts) { opts[:collection] } |