@@ -176,7 +176,7 @@ class BitbucketService {
176176 "locked": false,
177177 "reviewers": [${ reviewers ? reviewers.collect { "{\"user\": { \"name\": \"${it}\" }}" }.join(',') : ''} ]
178178 }"""
179- return withTokenCredentials { _ , token ->
179+ return withTokenCredentials { username , token ->
180180 def url = " ${ bitbucketUrl} /rest/api/1.0/projects/${ project} /repos/${ repo} /pull-requests"
181181 return this . httpRequestService. asString(
182182 HttpRequestService . HTTP_METHOD_POST ,
@@ -327,7 +327,8 @@ class BitbucketService {
327327 payload + = " ]" +
328328 " }"
329329 try {
330- def url = " ${ bitbucketUrl} /rest/insights/1.0/projects/${ project} /repos/${ repo} /commits/${ gitCommit} /reports/${ data.key} "
330+ def url = " ${ bitbucketUrl} " +
331+ " /rest/insights/1.0/projects/${ project} /repos/${ repo} /commits/${ gitCommit} /reports/${ data.key} "
331332 this . httpRequestService. asString(
332333 HttpRequestService . HTTP_METHOD_PUT ,
333334 HttpRequestService . AUTHORIZATION_SCHEME_BEARER ,
@@ -429,11 +430,11 @@ class BitbucketService {
429430 }
430431
431432 String getToken () {
432- withTokenCredentials { username , token -> return token}
433+ withTokenCredentials { username , token -> return token }
433434 }
434435
435436 @NonCPS
436- Map getCommitsForIntegrationBranch (String token , String repo , int limit , int nextPageStart ){
437+ Map getCommitsForIntegrationBranch (String token , String repo , int limit , int nextPageStart ) {
437438 String request = " ${ bitbucketUrl} /rest/api/1.0/projects/${ project} /repos/${ repo} /commits"
438439 return queryRepo(token, request, limit, nextPageStart)
439440 }
@@ -449,10 +450,10 @@ class BitbucketService {
449450 private Map queryRepo (String token , String request , int limit , int nextPageStart ) {
450451 Map<String , String > headers = buildHeaders(token)
451452 def httpRequest = Unirest . get(request). headers(headers)
452- if (limit> 0 ) {
453+ if (limit > 0 ) {
453454 httpRequest. queryString(" limit" , limit)
454455 }
455- if (nextPageStart> 0 ) {
456+ if (nextPageStart > 0 ) {
456457 httpRequest. queryString(" start" , nextPageStart)
457458 }
458459 def response = httpRequest. asString()
0 commit comments