debian-mirror-gitlab/app/serializers/ci/dag_job_entity.rb

12 lines
258 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
module Ci
class DagJobEntity < Grape::Entity
expose :name
expose :needs, if: -> (job, _) { job.scheduling_type_dag? } do |job|
job.needs.pluck(:name) # rubocop: disable CodeReuse/ActiveRecord
end
end
end