BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f07aee72
Commit
f07aee72
authored
Jun 01, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/deploy_keys__can_push__usage_in_api' into 'master'
Add missing `can_push` parameter to POST /v3/deploy_keys See merge request !11607
parents
483d88a9
00893f31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
bugfix-v3-deploy_keys-can_push.yml
changelogs/unreleased/bugfix-v3-deploy_keys-can_push.yml
+4
-0
deploy_keys.rb
lib/api/v3/deploy_keys.rb
+1
-0
deploy_keys_spec.rb
spec/requests/api/v3/deploy_keys_spec.rb
+9
-0
No files found.
changelogs/unreleased/bugfix-v3-deploy_keys-can_push.yml
0 → 100644
View file @
f07aee72
---
title
:
"
Fixed
handling
of
the
`can_push`
attribute
in
the
v3
deploy_keys
api"
merge_request
:
11607
author
:
Richard Clamp
lib/api/v3/deploy_keys.rb
View file @
f07aee72
...
@@ -41,6 +41,7 @@ module API
...
@@ -41,6 +41,7 @@ module API
params
do
params
do
requires
:key
,
type:
String
,
desc:
'The new deploy key'
requires
:key
,
type:
String
,
desc:
'The new deploy key'
requires
:title
,
type:
String
,
desc:
'The name of the deploy key'
requires
:title
,
type:
String
,
desc:
'The name of the deploy key'
optional
:can_push
,
type:
Boolean
,
desc:
"Can deploy key push to the project's repository"
end
end
post
":id/
#{
path
}
"
do
post
":id/
#{
path
}
"
do
params
[
:key
].
strip!
params
[
:key
].
strip!
...
...
spec/requests/api/v3/deploy_keys_spec.rb
View file @
f07aee72
...
@@ -105,6 +105,15 @@ describe API::V3::DeployKeys do
...
@@ -105,6 +105,15 @@ describe API::V3::DeployKeys do
expect
(
response
).
to
have_http_status
(
201
)
expect
(
response
).
to
have_http_status
(
201
)
end
end
it
'accepts can_push parameter'
do
key_attrs
=
attributes_for
:write_access_key
post
v3_api
(
"/projects/
#{
project
.
id
}
/
#{
path
}
"
,
admin
),
key_attrs
expect
(
response
).
to
have_http_status
(
201
)
expect
(
json_response
[
'can_push'
]).
to
eq
(
true
)
end
end
end
describe
"DELETE /projects/:id/
#{
path
}
/:key_id"
do
describe
"DELETE /projects/:id/
#{
path
}
/:key_id"
do
...
...
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