diff options
Diffstat (limited to 'lib/api/entities/ci/pipeline_with_metadata.rb')
-rw-r--r-- | lib/api/entities/ci/pipeline_with_metadata.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/entities/ci/pipeline_with_metadata.rb b/lib/api/entities/ci/pipeline_with_metadata.rb new file mode 100644 index 00000000000..a8b1d81a053 --- /dev/null +++ b/lib/api/entities/ci/pipeline_with_metadata.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module API + module Entities + module Ci + class PipelineWithMetadata < Pipeline + expose :name, + documentation: { type: 'string', example: 'Build pipeline' }, + if: ->(pipeline, _) { ::Feature.enabled?(:pipeline_name_in_api, pipeline.project) } + end + end + end +end |