Skip to content

Commit 31a135e

Browse files
committed
make codenarc happ[y|ier]
1 parent dcffce4 commit 31a135e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/org/ods/services/BitbucketService.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ class BitbucketService {
430430
}
431431

432432
String getToken() {
433-
withTokenCredentials { username, token -> return token}
433+
withTokenCredentials { username, token -> return token }
434434
}
435435

436436
@NonCPS
437-
Map getCommitsForIntegrationBranch(String token, String repo, int limit, int nextPageStart){
437+
Map getCommitsForIntegrationBranch(String token, String repo, int limit, int nextPageStart) {
438438
String request = "${bitbucketUrl}/rest/api/1.0/projects/${project}/repos/${repo}/commits"
439439
return queryRepo(token, request, limit, nextPageStart)
440440
}
@@ -450,10 +450,10 @@ class BitbucketService {
450450
private Map queryRepo(String token, String request, int limit, int nextPageStart) {
451451
Map<String, String> headers = buildHeaders(token)
452452
def httpRequest = Unirest.get(request).headers(headers)
453-
if (limit>0) {
453+
if (limit > 0) {
454454
httpRequest.queryString("limit", limit)
455455
}
456-
if (nextPageStart>0) {
456+
if (nextPageStart > 0) {
457457
httpRequest.queryString("start", nextPageStart)
458458
}
459459
def response = httpRequest.asString()

vars/odsComponentStageCopyImage.groovy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ def call(IContext context, Map config = [:]) {
1919

2020
// [REGISTRY/]REPO/IMAGE[:TAG]
2121
if (sourceImageDataSplitLength >= 2) {
22-
config.image = sourceImageData[sourceImageDataSplitLength-1]
23-
config.repo = sourceImageData[sourceImageDataSplitLength-2]
22+
config.image = sourceImageData[sourceImageDataSplitLength - 1]
23+
config.repo = sourceImageData[sourceImageDataSplitLength - 2]
2424
// no registry info, use internal cluster registry
2525
if (sourceImageDataSplitLength == 2) {
2626
config.registry = context.clusterRegistryAddress
2727
} else {
28-
config.registry = sourceImageData[0..sourceImageDataSplitLength-3].join('/')
28+
config.registry = sourceImageData[0..sourceImageDataSplitLength - 3].join('/')
2929
}
3030
config.registry = STR_DOCKER_PROTOCOL + config.registry
3131
} else {
@@ -54,6 +54,5 @@ def call(IContext context, Map config = [:]) {
5454
def buildResourceName = "imported-${imageName}"
5555
odsComponentStageScanWithAqua(context,
5656
[resourceName: "${buildResourceName}", imageLabels: context.extensionImageLabels])
57-
5857
}
5958
return this

0 commit comments

Comments
 (0)