From c32dc03fcbfa26c275906233717c0bcd6dedbd0b Mon Sep 17 00:00:00 2001 From: Hugues Malphettes Date: Mon, 30 Sep 2019 18:10:39 +0800 Subject: [PATCH] Fix setting REPO_WRITE permission on a repo ssh key --- default_api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/default_api.go b/default_api.go index 16457fe..ed018b3 100644 --- a/default_api.go +++ b/default_api.go @@ -8380,15 +8380,15 @@ func (a *DefaultApiService) CreateRepoSSHKey(projectKey, repositorySlug, sshPubK localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - permissions := "REPO_READ" + permission := "REPO_READ" if isWrite { - permissions = "REPO_WRITE" + permission = "REPO_WRITE" } localVarPostBody = map[string]interface{}{ "key": map[string]interface{}{ "text": sshPubKey, }, - "permissions": permissions, + "permission": permission, } // to determine the Content-Type header