summaryrefslogtreecommitdiff
path: root/lib/api/entities/pipeline.rb
blob: 778efbe4bcc5481583805eb7a72a9352ed67fd8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module API
  module Entities
    class Pipeline < Entities::PipelineBasic
      expose :before_sha, :tag, :yaml_errors

      expose :user, with: Entities::UserBasic
      expose :created_at, :updated_at, :started_at, :finished_at, :committed_at
      expose :duration
      expose :coverage
      expose :detailed_status, using: DetailedStatusEntity do |pipeline, options|
        pipeline.detailed_status(options[:current_user])
      end
    end
  end
end