Skip to content

Commit 72e1e21

Browse files
committed
add a param to be able to customize deploy key label
1 parent f812d0c commit 72e1e21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/com/codacy/client/bitbucket/service/RepositoryServices.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class RepositoryServices(client: BitbucketClient) {
2525
/*
2626
* Creates a ssh key
2727
*/
28-
def createKey(username: String, repo: String, key: String): RequestResponse[SshKey] = {
28+
def createKey(username: String, repo: String, key: String, label: String = "Codacy Key"): RequestResponse[SshKey] = {
2929
val url = s"https://bitbucket.org/api/1.0/repositories/$username/$repo/deploy-keys"
3030

3131
val values = Json.obj(
3232
"key" -> key,
33-
"label" -> "Codacy Key"
33+
"label" -> label
3434
)
3535

3636
client.postJson(Request(url, classOf[SshKey]), values)

0 commit comments

Comments
 (0)