Skip to content

Commit

Permalink
CID-2744: refactor function labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedlajmileanix committed Jul 23, 2024
1 parent 1c2d43a commit 1ef6b49
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class GitHubScanningService(
runCatching {
val jwtToken = cachingService.get("jwtToken") ?: throw JwtTokenNotFound()
val installations = getInstallations(jwtToken.toString())
fetchAndBroadcastOrganisationsData(installations)
fetchAndSendOrganisationsData(installations)
installations.forEach { installation ->
logger.info("Fetching repositories for organisation ${installation.account.login}")
fetchAndBroadcastRepositoriesData(installation)
fetchAndSendRepositoriesData(installation)
}
}.onFailure {
logger.error("Error while scanning GitHub resources")
Expand All @@ -51,7 +51,7 @@ class GitHubScanningService(
}
}

private fun fetchAndBroadcastOrganisationsData(
private fun fetchAndSendOrganisationsData(
installations: List<Installation>
) {
val installationToken = cachingService.get("installationToken:${installations.first().id}")
Expand All @@ -67,7 +67,7 @@ class GitHubScanningService(
webSocketService.sendMessage(WS_ORGANIZATIONS_TOPIC, organizations)
}

private fun fetchAndBroadcastRepositoriesData(installation: Installation) {
private fun fetchAndSendRepositoriesData(installation: Installation) {
val installationToken = cachingService.get("installationToken:${installation.id}").toString()
var cursor: String? = null
var totalRepos = 0
Expand Down

0 comments on commit 1ef6b49

Please sign in to comment.