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
2f040916
Commit
2f040916
authored
Mar 06, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `api/v3/deployments` to the correct namespace
parent
34f3d899
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
29 deletions
+31
-29
lib/api/deployments.rb
lib/api/deployments.rb
+1
-1
lib/api/v3/deployments.rb
lib/api/v3/deployments.rb
+30
-28
No files found.
lib/api/deployments.rb
View file @
2f040916
module
API
module
API
# Deployments RESTful
l
API endpoints
# Deployments RESTful API endpoints
class
Deployments
<
Grape
::
API
class
Deployments
<
Grape
::
API
include
PaginationParams
include
PaginationParams
...
...
lib/api/v3/deployments.rb
View file @
2f040916
module
API
module
API
# Deployments RESTfull API endpoints
module
V3
class
Deployments
<
Grape
::
API
# Deployments RESTful API endpoints
include
PaginationParams
class
Deployments
<
Grape
::
API
include
PaginationParams
before
{
authenticate!
}
before
{
authenticate!
}
params
do
requires
:id
,
type:
String
,
desc:
'The project ID'
end
resource
:projects
do
desc
'Get all deployments of the project'
do
detail
'This feature was introduced in GitLab 8.11.'
success
::
API
::
V3
::
Deployments
end
params
do
params
do
use
:pagination
requires
:id
,
type:
String
,
desc:
'The project ID'
end
end
get
':id/deployments'
do
resource
:projects
do
authorize!
:read_deployment
,
user_project
desc
'Get all deployments of the project'
do
detail
'This feature was introduced in GitLab 8.11.'
success
::
API
::
V3
::
Deployments
end
params
do
use
:pagination
end
get
':id/deployments'
do
authorize!
:read_deployment
,
user_project
present
paginate
(
user_project
.
deployments
),
with:
::
API
::
V3
::
Deployments
present
paginate
(
user_project
.
deployments
),
with:
::
API
::
V3
::
Deployments
end
end
desc
'Gets a specific deployment'
do
desc
'Gets a specific deployment'
do
detail
'This feature was introduced in GitLab 8.11.'
detail
'This feature was introduced in GitLab 8.11.'
success
::
API
::
V3
::
Deployments
success
::
API
::
V3
::
Deployments
end
end
params
do
params
do
requires
:deployment_id
,
type:
Integer
,
desc:
'The deployment ID'
requires
:deployment_id
,
type:
Integer
,
desc:
'The deployment ID'
end
end
get
':id/deployments/:deployment_id'
do
get
':id/deployments/:deployment_id'
do
authorize!
:read_deployment
,
user_project
authorize!
:read_deployment
,
user_project
deployment
=
user_project
.
deployments
.
find
(
params
[
:deployment_id
])
deployment
=
user_project
.
deployments
.
find
(
params
[
:deployment_id
])
present
deployment
,
with:
::
API
::
V3
::
Deployments
present
deployment
,
with:
::
API
::
V3
::
Deployments
end
end
end
end
end
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