/** * Delete the issue comment with the given id * * @param repository * @param commentId * @throws IOException */ public void deleteComment(IRepositoryIdProvider repository, long commentId) throws IOException { deleteComment(repository, Long.toString(commentId)); }
/** * Delete the issue comment with the given id * * @param user * @param repository * @param commentId * @throws IOException */ public void deleteComment(String user, String repository, long commentId) throws IOException { deleteComment(user, repository, Long.toString(commentId)); }
/** * Delete the issue comment with the given id * * @param repository * @param commentId * @throws IOException */ public void deleteComment(IRepositoryIdProvider repository, String commentId) throws IOException { String repoId = getId(repository); deleteComment(repoId, commentId); }
/** * Delete the issue comment with the given id * * @param user * @param repository * @param commentId * @throws IOException */ public void deleteComment(String user, String repository, String commentId) throws IOException { verifyRepository(user, repository); String repoId = user + '/' + repository; deleteComment(repoId, commentId); }
@Override public void removeComments(final List<Comment> comments) { for (final Comment comment : comments) { try { final Long commentId = Long.valueOf(comment.getIdentifier()); if (comment.getType().equals(TYPE_DIFF)) { pullRequestService.deleteComment(repository, commentId); } else { issueSerivce.deleteComment(repository, commentId); } } catch (final Throwable e) { violationsLogger.log(SEVERE, e.getMessage(), e); } } }
private void deleteComment(Comment comment) { try { this.issueService.deleteComment(this.gitHubGovernorConfiguration.getRepositoryUser(), this.gitHubGovernorConfiguration.getRepository(), comment.getId()); } catch (IOException e1) { } }