Commit cee74926 authored by Igor Drozdov's avatar Igor Drozdov

Enable MergeRequests::PipelineEntity usage

parent f0076ae8
......@@ -20,7 +20,7 @@ class MergeRequestPollWidgetEntity < Grape::Entity
expose :merge_user, using: UserEntity
expose :actual_head_pipeline, as: :pipeline, if: -> (mr, _) { presenter(mr).can_read_pipeline? } do |merge_request, options|
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project)
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.actual_head_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.actual_head_pipeline, options)
......@@ -28,7 +28,7 @@ class MergeRequestPollWidgetEntity < Grape::Entity
end
expose :merge_pipeline, if: ->(mr, _) { mr.merged? && can?(request.current_user, :read_pipeline, mr.target_project)} do |merge_request, options|
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project)
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.merge_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.merge_pipeline, options)
......
---
title: Serialize fewer pipeline fields for MR widget
merge_request: 38215
author:
type: performance
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment