From bb8ae56085cbae9545f8a78d0131bb857f53fbf6 Mon Sep 17 00:00:00 2001 From: Richard Clamp Date: Mon, 22 May 2017 15:49:19 +0100 Subject: 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. --- lib/api/v3/deploy_keys.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/api/v3/deploy_keys.rb') diff --git a/lib/api/v3/deploy_keys.rb b/lib/api/v3/deploy_keys.rb index bbb174b6003..b90e2061da3 100644 --- a/lib/api/v3/deploy_keys.rb +++ b/lib/api/v3/deploy_keys.rb @@ -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! -- cgit v1.2.1