Skip to content

Commit a3c0008

Browse files
authored
Merge pull request #32 from codacy/add_key_name_as_parameter
Added possibility to set the key's name, passing it as a parameter.
2 parents 63117d2 + a6c8b8d commit a3c0008

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Dependencies._
22

33
name := """bitbucket-scala-client"""
44

5-
version := "1.8.0-SNAPSHOT"
5+
version := "1.9.0-SNAPSHOT"
66

77
scalaVersion := "2.10.5"
88

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class UserServices(client: BitbucketClient) {
2323
/*
2424
* Creates a ssh key
2525
*/
26-
def createKey(username: String, key: String): RequestResponse[SshKey] = {
26+
def createKey(username: String, key: String, keyName: String = "Codacy Key"): RequestResponse[SshKey] = {
2727
val url = s"https://bitbucket.org/api/1.0/users/$username/ssh-keys"
2828

2929
val values = Json.obj(
3030
"key" -> key,
31-
"label" -> "Codacy Key"
31+
"label" -> keyName
3232
)
3333

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

0 commit comments

Comments
 (0)