debian-mirror-gitlab/lib/api/entities/package_file.rb

13 lines
333 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module API
module Entities
class PackageFile < Grape::Entity
expose :id, :package_id, :created_at
expose :file_name, :size
expose :file_md5, :file_sha1
2021-01-29 00:20:46 +05:30
expose :pipelines, if: ->(package_file) { package_file.pipelines.present? }, using: Package::Pipeline
2020-07-28 23:09:34 +05:30
end
end
end