Skip to content

Commit

Permalink
Allow to inject build scans pointer on success
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Jan 5, 2024
1 parent 319fc30 commit fbbc73e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,15 @@ private void handleCompleted(GHWorkflowRun workflowRun,
if (conclusion != Conclusion.FAILURE) {
if (!pullRequest.isDraft() && conclusion == Conclusion.SUCCESS
&& !hasPendingCheckRuns(pullRequest)) {
pullRequest.comment(PULL_REQUEST_COMPLETED_SUCCESSFULLY + "\n\n" + WorkflowConstants.MESSAGE_ID_ACTIVE);
String successComment = PULL_REQUEST_COMPLETED_SUCCESSFULLY
+ "\n\n" + WorkflowConstants.MESSAGE_ID_ACTIVE
+ "\n" + String.format(WorkflowConstants.WORKFLOW_RUN_ID_MARKER, workflowRun.getId());

if (buildReporterConfig.isDevelocityEnabled()) {
successComment += "\n" + WorkflowConstants.BUILD_SCANS_CHECK_RUN_MARKER;
}

pullRequest.comment(successComment);
}
return;
}
Expand Down

0 comments on commit fbbc73e

Please sign in to comment.