diff options
Diffstat (limited to 'app/serializers/merge_requests/pipeline_entity.rb')
-rw-r--r-- | app/serializers/merge_requests/pipeline_entity.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/serializers/merge_requests/pipeline_entity.rb b/app/serializers/merge_requests/pipeline_entity.rb index f4fb01604d0..76e75a8ca6d 100644 --- a/app/serializers/merge_requests/pipeline_entity.rb +++ b/app/serializers/merge_requests/pipeline_entity.rb @@ -5,6 +5,7 @@ class MergeRequests::PipelineEntity < Grape::Entity expose :id expose :active?, as: :active + expose :name, if: -> (pipeline, _) { Feature.enabled?(:pipeline_name, pipeline.project) } expose :path do |pipeline| project_pipeline_path(pipeline.project, pipeline) @@ -17,8 +18,12 @@ class MergeRequests::PipelineEntity < Grape::Entity expose :commit, using: CommitEntity expose :details do - expose :name do |pipeline| - pipeline.present.name + expose :event_type_name do |pipeline| + pipeline.present.event_type_name + end + + expose :name do |pipeline| # To be removed in 15.7 + pipeline.present.event_type_name end expose :artifacts do |pipeline, options| |