debian-mirror-gitlab/app/serializers/ci/dag_job_entity.rb
2020-05-25 16:23:42 +05:30

11 lines
258 B
Ruby

# 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