summaryrefslogtreecommitdiff
path: root/app/serializers/ci/lint/result_entity.rb
blob: f9306d1dc70dc8902af0a4472dbe1cf01f70a38e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# 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