Commit a9d777a4 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'id-remove-merge_request_short_pipeline_serializer-ff' into 'master'

Remove merge_request_short_pipeline_serializer FF

See merge request gitlab-org/gitlab!43331
parents 5464cf12 8c0cb936
......@@ -20,19 +20,11 @@ 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, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.actual_head_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.actual_head_pipeline, options)
end
MergeRequests::PipelineEntity.represent(merge_request.actual_head_pipeline, options)
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, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.merge_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.merge_pipeline, options)
end
MergeRequests::PipelineEntity.represent(merge_request.merge_pipeline, options)
end
expose :default_merge_commit_message
......
---
name: merge_request_short_pipeline_serializer
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
......@@ -44,20 +44,6 @@ RSpec.describe MergeRequestPollWidgetEntity do
expect(subject[:merge_pipeline]).to eq(pipeline_payload)
end
context 'when merge_request_short_pipeline_serializer is disabled' do
it 'returns detailed info about pipeline' do
stub_feature_flags(merge_request_short_pipeline_serializer: false)
pipeline.reload
pipeline_payload =
PipelineDetailsEntity
.represent(pipeline, request: request)
.as_json
expect(subject[:merge_pipeline]).to eq(pipeline_payload)
end
end
context 'when user cannot read pipelines on target project' do
before do
project.add_guest(user)
......@@ -245,19 +231,6 @@ RSpec.describe MergeRequestPollWidgetEntity do
expect(subject[:pipeline]).to eq(pipeline_payload)
end
context 'when merge_request_short_pipeline_serializer is disabled' do
it 'returns detailed info about pipeline' do
stub_feature_flags(merge_request_short_pipeline_serializer: false)
pipeline_payload =
PipelineDetailsEntity
.represent(pipeline, request: req)
.as_json
expect(subject[:pipeline]).to eq(pipeline_payload)
end
end
it 'returns ci_status' do
expect(subject[:ci_status]).to eq('pending')
end
......
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