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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2b33e9ee
Commit
2b33e9ee
authored
Mar 10, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
with_status to only_status
parent
170e5423
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+1
-1
app/serializers/build_serializer.rb
app/serializers/build_serializer.rb
+1
-1
app/serializers/pipeline_serializer.rb
app/serializers/pipeline_serializer.rb
+1
-1
spec/serializers/build_serializer_spec.rb
spec/serializers/build_serializer_spec.rb
+1
-1
spec/serializers/pipeline_serializer_spec.rb
spec/serializers/pipeline_serializer_spec.rb
+1
-1
No files found.
app/controllers/projects/builds_controller.rb
View file @
2b33e9ee
...
...
@@ -76,7 +76,7 @@ class Projects::BuildsController < Projects::ApplicationController
def
status
render
json:
BuildSerializer
.
new
(
project:
@project
,
user:
@current_user
)
.
with
_status
.
only
_status
.
represent
(
@build
)
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
2b33e9ee
...
...
@@ -476,7 +476,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def
status
render
json:
PipelineSerializer
.
new
(
project:
@project
,
user:
@current_user
)
.
with
_status
.
only
_status
.
represent
(
@merge_request
.
head_pipeline
)
end
...
...
app/controllers/projects/pipelines_controller.rb
View file @
2b33e9ee
...
...
@@ -75,7 +75,7 @@ class Projects::PipelinesController < Projects::ApplicationController
def
status
render
json:
PipelineSerializer
.
new
(
project:
@project
,
user:
@current_user
)
.
with
_status
.
only
_status
.
represent
(
@pipeline
)
end
...
...
app/serializers/build_serializer.rb
View file @
2b33e9ee
class
BuildSerializer
<
BaseSerializer
entity
BuildEntity
def
with
_status
def
only
_status
tap
{
@status_only
=
{
only:
[{
details:
[
:status
]
}]
}
}
end
...
...
app/serializers/pipeline_serializer.rb
View file @
2b33e9ee
...
...
@@ -11,7 +11,7 @@ class PipelineSerializer < BaseSerializer
@paginator
.
present?
end
def
with
_status
def
only
_status
tap
{
@status_only
=
{
only:
[{
details:
[
:status
]
}]
}
}
end
...
...
spec/serializers/build_serializer_spec.rb
View file @
2b33e9ee
...
...
@@ -13,7 +13,7 @@ describe BuildSerializer do
context
'when used with status'
do
let
(
:serializer
)
do
described_class
.
new
(
user:
user
)
.
with
_status
.
only
_status
end
let
(
:resource
)
{
create
(
:ci_build
)
}
...
...
spec/serializers/pipeline_serializer_spec.rb
View file @
2b33e9ee
...
...
@@ -97,7 +97,7 @@ describe PipelineSerializer do
context
'when used with status'
do
let
(
:serializer
)
do
described_class
.
new
(
user:
user
)
.
with
_status
.
only
_status
end
let
(
:resource
)
{
create
(
:ci_empty_pipeline
)
}
...
...
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