Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ class ArtifactDownloadHandler(
override fun handleFrame(headers: StompHeaders, payload: Any?) {
payload?.let {
val dto = payload as ArtifactDownloadDTO
logger.info("Received artifact download message from server for repo: ${dto.repositoryName}")
logger.debug("Received artifact download message from server for repo: ${dto.repositoryName}")
runCatching {
val installationToken =
"Bearer ${gitHubAuthenticationService.getInstallationToken(dto.installationId)}"

getValidArtifacts(dto, installationToken)
.takeIf { it.isNotEmpty() }
?.let { artifacts ->
logger.info("Found ${artifacts.size} artifact(s).")
logger.debug("Found ${artifacts.size} artifact(s).")
fetchAndProcessArtifacts(artifacts, dto, installationToken)
} ?: logger.info("No artifacts found for this repository: ${dto.repositoryName}")
} ?: logger.debug("No artifacts found for this repository: ${dto.repositoryName}")
}
}
}
Expand All @@ -66,7 +66,7 @@ class ArtifactDownloadHandler(
installationToken: String
) {
artifacts.forEach { artifact ->
logger.info("Processing artifact: ${artifact.name}")
logger.debug("Processing artifact: ${artifact.name}")
downloadAndSendArtifact(dto, artifact, installationToken)
}
}
Expand Down
Loading