Package org.eclipse.egit.github.core

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


        Thread.sleep(1 * 1000);

        // Verify that the mock pull request service received this comment.
        List<CommitComment> commitComments = pullRequestService.getComments(null, (int) pullRequest.getId());
        assertEquals(1, commitComments.size());
        CommitComment commitComment = commitComments.get(0);
        assertEquals("Commit IDs did not match ", Long.toString(pullRequest.getId()), commitComment.getCommitId());
        assertEquals("Comment text did not match ", commentText, commitComment.getBodyText());
    }
View Full Code Here


    @Test
    public void pullRequestCommentTest() throws Exception {
        PullRequest pr1 = pullRequestService.addPullRequest("First add");
        PullRequest pr2 = pullRequestService.addPullRequest("Second");
        CommitComment commitComment1 = pullRequestService.addComment(pr1.getId(), "First comment");
        CommitComment commitComment2 = pullRequestService.addComment(pr2.getId(), "Second comment");
        mockResultEndpoint.expectedBodiesReceivedInAnyOrder(commitComment1, commitComment2);

        Thread.sleep(1 * 1000);         // TODO do I need this?

        mockResultEndpoint.assertIsSatisfied();
View Full Code Here

        return author;
    }

    public CommitComment addComment(Long pullRequestId, String bodyText) {
        CommitComment commitComment = new CommitComment();

        User author = createAuthor();
        commitComment.setUser(author);
        commitComment.setCommitId("" + pullRequestId);
        commitComment.setId(commentId.getAndIncrement());
        commitComment.setBody(bodyText);
        commitComment.setBodyText(bodyText);

        List<CommitComment> comments;
        if (allComments.containsKey(pullRequestId)) {
            comments = allComments.get(pullRequestId);
        } else {
View Full Code Here

        List<CommitComment> gitCommitComments = CommitCommentServices.getGitCommitComments(gitRepo, repoCommit);
        if (gitCommitComments.size() != repoCommit.getComments().size()) {
            out.printLog("Gravando " + gitCommitComments.size() + " Comentarios no Commit...");
            int i = 0;
            while (!canceled && i < gitCommitComments.size()) {
                CommitComment gitCommitComment = gitCommitComments.get(i);
                EntityCommitComment commitComment = minerCommentOfRepoCommit(gitCommitComment);
                commitComment.setRepositoryCommit(repoCommit);
                dao.edit(commitComment);
                i++;
            }
View Full Code Here

TOP

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

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.