diff --git a/tasks/git/src/main/java/com/walmartlabs/concord/plugins/git/GitHubTask.java b/tasks/git/src/main/java/com/walmartlabs/concord/plugins/git/GitHubTask.java index d8740af..a213a8f 100644 --- a/tasks/git/src/main/java/com/walmartlabs/concord/plugins/git/GitHubTask.java +++ b/tasks/git/src/main/java/com/walmartlabs/concord/plugins/git/GitHubTask.java @@ -278,17 +278,17 @@ private Map commentPR(Map in, String gitHubUri) if (dryRunMode) { log.info("Dry-run mode enabled: Skipping comment on PR #{} in {}/{}", gitHubPRID, gitHubOrgName, gitHubRepoName); - return Map.of(); + return Map.of("id", 0); } log.info("Commenting PR #{} in {}/{}", gitHubPRID, gitHubOrgName, gitHubRepoName); try { PullRequest pullRequest = prService.getPullRequest(repo, gitHubPRID); - issueService.createComment(repo, Integer.toString(pullRequest.getNumber()), gitHubPRComment); + Comment response = issueService.createComment(repo, Integer.toString(pullRequest.getNumber()), gitHubPRComment); log.info("Commented on PR# {}", gitHubPRID); - return Collections.emptyMap(); + return Map.of("id", response.getId()); } catch (IOException e) { throw new RuntimeException("Cannot comment on the pull request: " + e.getMessage()); }