debian-mirror-gitlab/app/serializers/ci/lint/result_entity.rb
2020-11-24 15:15:51 +05:30

12 lines
265 B
Ruby

# frozen_string_literal: true
class Ci::Lint::ResultEntity < Grape::Entity
expose :valid?, as: :valid
expose :errors
expose :warnings
expose :jobs, using: Ci::Lint::JobEntity do |result, options|
next [] unless result.valid?
result.jobs
end
end