Add missing `can_push` parameter to POST /v3/deploy_keys

The v3 API documentation claims that `can_push` is supported when
adding a deploy_key.

https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/deploy_keys.md#add-deploy-key

Here we make good on this promise by adding `can_push` as an optional
parameter so grape can route it.

This was copied from the v4 API.
This commit is contained in:
Richard Clamp 2017-05-22 15:49:19 +01:00
parent a4407e75d3
commit bb8ae56085
1 changed files with 1 additions and 0 deletions

View File

@ -41,6 +41,7 @@ module API
params do
requires :key, type: String, desc: 'The new 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
post ":id/#{path}" do
params[:key].strip!