summaryrefslogtreecommitdiff
path: root/lib/api/entities/ci/pipeline_basic_with_metadata.rb
blob: 4eeba3aec41b672a325bd51c9a567ae902f524f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module API
  module Entities
    module Ci
      class PipelineBasicWithMetadata < PipelineBasic
        expose :name,
          documentation: { type: 'string', example: 'Build pipeline' },
          if: ->(pipeline, _) { ::Feature.enabled?(:pipeline_name_in_api, pipeline.project) }
      end
    end
  end
end