Skip to content

Commit

Permalink
Issue-361: Add prudent information about a publishing of checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
macetwatargo committed Oct 4, 2023
1 parent 8d17133 commit 9374cc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ public void publish(final ChecksDetails details) {

context.addActionIfMissing(run.getId(), gitHubDetails.getName());

buildLogger.log("GitHub check (name: %s, status: %s) has been published.", gitHubDetails.getName(),
gitHubDetails.getStatus());
SYSTEM_LOGGER.fine(format("Published check for repo: %s, sha: %s, job name: %s, name: %s, status: %s",
buildLogger.log("GitHub check (name: %s, status: %s, url: %s) has been published.",
gitHubDetails.getName(),
gitHubDetails.getStatus(),
gitHub.getApiUrl());
SYSTEM_LOGGER.fine(format("Published check for url: %s, repo: %s, sha: %s, job name: %s, name: %s, status: %s",
github.getApiUrl(),
context.getRepository(),
context.getHeadSha(),
context.getJob().getFullName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ public void shouldLogChecksParametersIfExceptionHappensWhenPublishChecks() {
assertThat(loggerRule.getMessages().get(0))
.contains("Failed Publishing GitHub checks: ")
.contains("name='Jenkins'")
.contains("url=foobar")
.contains("status=COMPLETED")
.contains("conclusion=SUCCESS")
.contains("title='Jenkins Check'")
Expand Down

0 comments on commit 9374cc3

Please sign in to comment.