Package org.eclipse.egit.github.core

Examples of org.eclipse.egit.github.core.Comment


                }
            }
        }
       
        while (!newComments.empty()) {
            Comment newComment = newComments.pop();
            Exchange e = getEndpoint().createExchange();
            e.getIn().setBody(newComment);
           
            // Required by the producers.  Set it here for convenience.
            e.getIn().setHeader("GitHubPullRequest", commentIdToPullRequest.get(newComment.getId()));
           
            getProcessor().process(e);
        }
        return newComments.size();
    }
View Full Code Here


    public void process(Exchange exchange) throws Exception {
        Integer pullRequestNumber = exchange.getIn().getHeader("GitHubPullRequest", Integer.class);
        Integer inResponseTo = exchange.getIn().getHeader("GitHubInResponseTo", Integer.class);
        String text = exchange.getIn().getBody(String.class);
       
        Comment response;
        if (inResponseTo != null && inResponseTo > 0) {
            response = pullRequestService.replyToComment(getRepository(), pullRequestNumber, inResponseTo, text);
        } else {
            // Otherwise, just comment on the pull request itself.
            response = issueService.createComment(getRepository(), pullRequestNumber, text);
View Full Code Here

    public class PullRequestCommentProcessor implements Processor {
        @Override
        public void process(Exchange exchange) throws Exception {
            Message in = exchange.getIn();
            Comment comment = (Comment) in.getBody();
            LOG.debug("Got Comment " + comment.getId() + " [" + comment.getBody() + "] from User [" + comment.getUser().getLogin() + "]");
        }
View Full Code Here

        return comments;
    }

    @Override
    public Comment createComment(IRepositoryIdProvider repository, int issueNumber, String commentText) throws IOException {
        Comment addedComment = mockPullRequestService.addComment((long) issueNumber, commentText);
        return addedComment;
    }
View Full Code Here

        out.printLog("Baixando Comentários...");
        List<Comment> gitComments = CommentServices.getGitCommentsByIssue(gitRepo, issue.getNumber());
        out.printLog(gitComments.size() + " Comentários baixados.");
        int i = 0;
        while (!canceled && i < gitComments.size()) {
            Comment gitComment = gitComments.get(i);
            EntityComment comment = minerCommentOfIssue(gitComment);
            comment.setIssue(issue);
            dao.edit(comment);
            i++;
        }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.github.core.Comment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.