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
cee74926
Commit
cee74926
authored
Jul 29, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable MergeRequests::PipelineEntity usage
parent
f0076ae8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/serializers/merge_request_poll_widget_entity.rb
app/serializers/merge_request_poll_widget_entity.rb
+2
-2
changelogs/unreleased/id-enable-pipelines-serializer-ff.yml
changelogs/unreleased/id-enable-pipelines-serializer-ff.yml
+5
-0
No files found.
app/serializers/merge_request_poll_widget_entity.rb
View file @
cee74926
...
...
@@ -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
)
...
...
changelogs/unreleased/id-enable-pipelines-serializer-ff.yml
0 → 100644
View file @
cee74926
---
title
:
Serialize fewer pipeline fields for MR widget
merge_request
:
38215
author
:
type
:
performance
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