/** * Get an issue's comments * * @param repository * @param issueNumber * @return list of comments * @throws IOException */ public List<Comment> getComments(IRepositoryIdProvider repository, int issueNumber) throws IOException { return getComments(repository, Integer.toString(issueNumber)); }
/** * Get an issue's comments * * @param user * @param repository * @param issueNumber * @return list of comments * @throws IOException */ public List<Comment> getComments(String user, String repository, int issueNumber) throws IOException { return getComments(user, repository, Integer.toString(issueNumber)); }
protected List<Comment> getComments(final IRepositoryIdProvider repo, final int issueId) { List<Comment> comments = null; try { comments = service.getComments(repo, issueId); } catch (IOException e) { log.error("Exception fetching comments for issue/pullrequest {}:{}", new Object[]{repo.generateId(), issueId, e}); } return comments; }
/** * Get an issue's comments * * @param repository * @param issueNumber * @return list of comments * @throws IOException */ public List<Comment> getComments(IRepositoryIdProvider repository, String issueNumber) throws IOException { String repoId = getId(repository); return getComments(repoId, issueNumber); }
/** * Get an issue's comments * * @param user * @param repository * @param issueNumber * @return list of comments * @throws IOException */ public List<Comment> getComments(String user, String repository, String issueNumber) throws IOException { verifyRepository(user, repository); String repoId = user + '/' + repository; return getComments(repoId, issueNumber); }
@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<Comment> comments = issueService.getComments(getRepository(), pullRequest.getNumber()); for (Comment comment : comments) { if (!commentIds.contains(comment.getId())) {
commentIds.add(comment.getId()); List<Comment> comments = issueService.getComments(getRepository(), pullRequest.getNumber()); for (Comment comment : comments) { commentIds.add(comment.getId());