@Test public void ignoresGithubComment() { handler = new CreateGithubCommentOnFundHandler(githubGateway, githubCommentFactory, requestService, false, "fundrequest-notifier"); handler.createGithubCommentOnRequestFunded(createEvent(65478L)); verifyZeroInteractions(githubGateway); }
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestFunded(final RequestFundedEvent event) { if (addComment) { final IssueInformationDto issueInformation = requestService.findRequest(event.getRequestId()).getIssueInformation(); if (issueInformation.getPlatform() == Platform.GITHUB && !isCommentAlreadyPresent(issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo())) { placeComment(event.getRequestId(), issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo()); } } }
CreateGithubCommentOnFundHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestFunded(final RequestFundedEvent event) { if (addComment) { final IssueInformationDto issueInformation = requestService.findRequest(event.getRequestId()).getIssueInformation(); if (issueInformation.getPlatform() == Platform.GITHUB && !isCommentAlreadyPresent(issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo())) { placeComment(event.getRequestId(), issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo()); } } } }
CreateGithubCommentOnFundHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestFunded(final RequestFundedEvent event) { if (addComment) { final IssueInformationDto issueInformation = requestService.findRequest(event.getRequestId()).getIssueInformation(); if (issueInformation.getPlatform() == Platform.GITHUB && !isCommentAlreadyPresent(issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo())) { placeComment(event.getRequestId(), issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo()); } } } CreateGithubCommentOnFundHandler(final GithubGateway githubGateway,
                                            final GithubCommentFactory githubCommentFactory,
                                            final RequestService requestService,
                                            @Value("${github.add-comments:false}") final Boolean addComment,
                                            @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); }
CreateGithubCommentOnFundHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestFunded(final RequestFundedEvent event) { if (addComment) { final IssueInformationDto issueInformation = requestService.findRequest(event.getRequestId()).getIssueInformation(); if (issueInformation.getPlatform() == Platform.GITHUB && !isCommentAlreadyPresent(issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo())) { placeComment(event.getRequestId(), issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo()); } } } CreateGithubCommentOnFundHandler(final GithubGateway githubGateway,
                                            final GithubCommentFactory githubCommentFactory,
                                            final RequestService requestService,
                                            @Value("${github.add-comments:false}") final Boolean addComment,
                                            @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void createGithubCommentOnRequestFunded(final RequestFundedEvent event); }
CreateGithubCommentOnFundHandler { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void createGithubCommentOnRequestFunded(final RequestFundedEvent event) { if (addComment) { final IssueInformationDto issueInformation = requestService.findRequest(event.getRequestId()).getIssueInformation(); if (issueInformation.getPlatform() == Platform.GITHUB && !isCommentAlreadyPresent(issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo())) { placeComment(event.getRequestId(), issueInformation.getNumber(), issueInformation.getOwner(), issueInformation.getRepo()); } } } CreateGithubCommentOnFundHandler(final GithubGateway githubGateway,
                                            final GithubCommentFactory githubCommentFactory,
                                            final RequestService requestService,
                                            @Value("${github.add-comments:false}") final Boolean addComment,
                                            @Value("${feign.client.github.username:fundrequest-notifier}") final String githubUser); @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) void createGithubCommentOnRequestFunded(final RequestFundedEvent event);  }