Skip to content

Commit 6091908

Browse files
CID-3369: detekt and refactor
1 parent 1f83114 commit 6091908

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/kotlin/net/leanix/githubagent/services/GitHubEnterpriseService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class GitHubEnterpriseService(
2727
}.onFailure {
2828
when (it) {
2929
is GitHubAppInsufficientPermissionsException -> {
30-
syncLogService.sendErrorLog(it.message!!)
3130
logger.error(it.message)
31+
syncLogService.sendErrorLog(it.message!!)
3232
}
3333
else -> {
3434
logger.error("Failed to verify JWT token", it)

src/test/kotlin/net/leanix/githubagent/services/GitHubScanningServiceTest.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,13 @@ class GitHubScanningServiceTest {
243243
)
244244
gitHubScanningService.scanGitHubResources()
245245
verify { webSocketService.sendMessage(eq("$runId/organizations"), any()) }
246-
verify { syncLogService.sendErrorLog("Failed to scan organization testInstallation1. Installation missing " +
247-
"the following permissions: [administration, contents, metadata], " +
248-
"and the following events: [label, public, repository, push]") }
246+
verify {
247+
syncLogService.sendErrorLog(
248+
"Failed to scan organization testInstallation1. Installation missing " +
249+
"the following permissions: [administration, contents, metadata], " +
250+
"and the following events: [label, public, repository, push]"
251+
)
252+
}
249253
verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") }
250254
verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") }
251255
}

0 commit comments

Comments
 (0)