Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8c0cb936
Commit
8c0cb936
authored
Sep 24, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove merge_request_short_pipeline_serializer FF
parent
334e139d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
44 deletions
+2
-44
app/serializers/merge_request_poll_widget_entity.rb
app/serializers/merge_request_poll_widget_entity.rb
+2
-10
config/feature_flags/development/merge_request_short_pipeline_serializer.yml
...s/development/merge_request_short_pipeline_serializer.yml
+0
-7
spec/serializers/merge_request_poll_widget_entity_spec.rb
spec/serializers/merge_request_poll_widget_entity_spec.rb
+0
-27
No files found.
app/serializers/merge_request_poll_widget_entity.rb
View file @
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
...
...
config/feature_flags/development/merge_request_short_pipeline_serializer.yml
deleted
100644 → 0
View file @
334e139d
---
name
:
merge_request_short_pipeline_serializer
introduced_by_url
:
rollout_issue_url
:
group
:
type
:
development
default_enabled
:
true
spec/serializers/merge_request_poll_widget_entity_spec.rb
View file @
8c0cb936
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment