Skip to content

Commit

Permalink
CID-3369: detekt and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedlajmileanix committed Jan 2, 2025
1 parent 1f83114 commit 6091908
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class GitHubEnterpriseService(
}.onFailure {
when (it) {
is GitHubAppInsufficientPermissionsException -> {
syncLogService.sendErrorLog(it.message!!)
logger.error(it.message)
syncLogService.sendErrorLog(it.message!!)
}
else -> {
logger.error("Failed to verify JWT token", it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,13 @@ class GitHubScanningServiceTest {
)
gitHubScanningService.scanGitHubResources()
verify { webSocketService.sendMessage(eq("$runId/organizations"), any()) }
verify { syncLogService.sendErrorLog("Failed to scan organization testInstallation1. Installation missing " +
"the following permissions: [administration, contents, metadata], " +
"and the following events: [label, public, repository, push]") }
verify {
syncLogService.sendErrorLog(
"Failed to scan organization testInstallation1. Installation missing " +
"the following permissions: [administration, contents, metadata], " +
"and the following events: [label, public, repository, push]"
)
}
verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") }
verify { syncLogService.sendInfoLog("Finished initial full scan for organization testInstallation2.") }
}
Expand Down

0 comments on commit 6091908

Please sign in to comment.