debian-mirror-gitlab/lib/api/entities/ci/job_request/dependency.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
422 B
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
module API
module Entities
module Ci
module JobRequest
class Dependency < Grape::Entity
2022-07-16 23:28:13 +05:30
expose :id, :name
expose :token do |job, options|
options[:running_job]&.token
end
2021-10-27 15:23:28 +05:30
expose :artifacts_file, using: Entities::Ci::JobArtifactFile, if: ->(job, _) { job.available_artifacts? }
2021-09-30 23:02:18 +05:30
end
end
end
end
end