Skip to content

Commit

Permalink
Merge pull request #157 from garethjevans/check-title
Browse files Browse the repository at this point in the history
fix: correct the check title so duplicate checks are not received
  • Loading branch information
garethjevans authored May 5, 2021
2 parents 0b111c5 + 91d80bd commit c761eec
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ public String createPipelineRun(InputStream inputStream, EnvVars envVars) throws
resourceName = updatedPipelineRun.getMetadata().getName();

ChecksDetails checkDetails = new ChecksDetails.ChecksDetailsBuilder()
.withName("Tekton: " + updatedPipelineRun.getMetadata().getName())
.withName("tekton")
.withOutput(new ChecksOutput.ChecksOutputBuilder()
.withTitle(updatedPipelineRun.getMetadata().getName())
.build())
.withStartedAt(LocalDateTime.now())
.withStatus(ChecksStatus.IN_PROGRESS)
.withConclusion(ChecksConclusion.NONE)
.build();
Expand Down Expand Up @@ -423,10 +427,13 @@ protected String runCreate(Run<?, ?> run, FilePath workspace, EnvVars envVars) {
run.setResult(Result.FAILURE);

ChecksDetails checkDetails = new ChecksDetails.ChecksDetailsBuilder()
.withName("Tekton: " + createdResourceName)
.withName("tekton")
.withStatus(ChecksStatus.COMPLETED)
.withConclusion(ChecksConclusion.FAILURE)
.withOutput(new ChecksOutput.ChecksOutputBuilder().withText(buffer.toString()).build())
.withOutput(new ChecksOutput.ChecksOutputBuilder()
.withTitle(createdResourceName)
.withText(buffer.toString())
.build())
.withDetailsURL(DisplayURLProvider.get().getRunURL(run))
.withCompletedAt(LocalDateTime.now(ZoneOffset.UTC))
.build();
Expand Down

0 comments on commit c761eec

Please sign in to comment.