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
Jérome Perrin
gitlab-ce
Commits
f6a8894a
Commit
f6a8894a
authored
May 19, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose last_pipeline only when detailed status
parent
92bc1dda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/api/entities.rb
lib/api/entities.rb
+1
-1
lib/api/pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+5
-5
No files found.
lib/api/entities.rb
View file @
f6a8894a
...
...
@@ -690,7 +690,7 @@ module API
expose
:id
expose
:description
,
:ref
,
:cron
,
:cron_timezone
,
:next_run_at
,
:active
expose
:created_at
,
:updated_at
,
:deleted_at
expose
:last_pipeline
,
using:
Entities
::
PipelineBasic
expose
:last_pipeline
,
using:
Entities
::
PipelineBasic
,
if:
{
type: :full
}
expose
:owner
,
using:
Entities
::
UserBasic
end
...
...
lib/api/pipeline_schedules.rb
View file @
f6a8894a
...
...
@@ -31,7 +31,7 @@ module API
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
,
type: :full
end
desc
'Creates a new pipeline schedule'
do
...
...
@@ -52,7 +52,7 @@ module API
.
execute
if
pipeline_schedule
.
persisted?
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
,
type: :full
else
render_validation_error!
(
pipeline_schedule
)
end
...
...
@@ -75,7 +75,7 @@ module API
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
if
pipeline_schedule
.
update
(
declared_params
(
include_missing:
false
))
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
,
type: :full
else
render_validation_error!
(
pipeline_schedule
)
end
...
...
@@ -93,7 +93,7 @@ module API
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
if
pipeline_schedule
.
own!
(
current_user
)
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
,
with:
Entities
::
PipelineSchedule
,
type: :full
else
render_validation_error!
(
pipeline_schedule
)
end
...
...
@@ -110,7 +110,7 @@ module API
return
not_found!
(
'PipelineSchedule'
)
unless
pipeline_schedule
present
pipeline_schedule
.
destroy
,
with:
Entities
::
PipelineSchedule
present
pipeline_schedule
.
destroy
,
with:
Entities
::
PipelineSchedule
,
type: :full
end
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