public List<CommitComment> getComments(final IRepositoryIdProvider repository, final int pullrequestId) { List<CommitComment> comments = null; try { comments = service.getComments(repository, pullrequestId); } catch (IOException e) { log.error("IO Exception fetching comments {}:{}", new Object[]{repository.generateId(), pullrequestId, e}); } return comments; }
@Override public List<Comment> getComments() { final List<Comment> comments = new ArrayList<>(); try { final List<String> specifics = new ArrayList<>(); for (final CommitComment commitComment : pullRequestService.getComments( repository, violationCommentsToGitHubApi.getPullRequestId())) { comments.add( new Comment( Long.toString(commitComment.getId()), commitComment.getBody(), TYPE_DIFF, specifics)); } for (final org.eclipse.egit.github.core.Comment comment : issueSerivce.getComments(repository, violationCommentsToGitHubApi.getPullRequestId())) { comments.add( new Comment(Long.toString(comment.getId()), comment.getBody(), TYPE_PR, specifics)); } } catch (final Exception e) { violationsLogger.log(SEVERE, e.getMessage(), e); } return comments; }
List<CommitComment> commitComments = pullRequestService.getComments(getRepository(), pullRequest.getNumber()); for (Comment comment : commitComments) { if (!commentIds.contains(comment.getId())) {
List<PullRequest> pullRequests = pullRequestService.getPullRequests(getRepository(), "open"); for (PullRequest pullRequest : pullRequests) { List<CommitComment> commitComments = pullRequestService.getComments(getRepository(), pullRequest.getNumber()); for (Comment comment : commitComments) {