Search in sources :

Example 1 with CreateReviewComment

use of com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment in project gh4a by slapperwan.

the class EditPullRequestCommentActivity method createComment.

@Override
protected Single<GitHubCommentBase> createComment(String repoOwner, String repoName, String body, long replyToCommentId) {
    int prNumber = getIntent().getIntExtra("pr", 0);
    PullRequestReviewCommentService service = ServiceFactory.get(PullRequestReviewCommentService.class, false);
    CreateReviewComment request = CreateReviewComment.builder().body(body).inReplyTo(replyToCommentId).build();
    return service.createReviewComment(repoOwner, repoName, prNumber, request).map(ApiHelpers::throwOnFailure);
}
Also used : ApiHelpers(com.gh4a.utils.ApiHelpers) CreateReviewComment(com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment) PullRequestReviewCommentService(com.meisolsson.githubsdk.service.pull_request.PullRequestReviewCommentService)

Example 2 with CreateReviewComment

use of com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment in project gh4a by slapperwan.

the class ReviewFragment method onEditorDoSend.

@Override
public Single<?> onEditorDoSend(String comment) {
    PullRequestReviewCommentService service = ServiceFactory.get(PullRequestReviewCommentService.class, false);
    CreateReviewComment request = CreateReviewComment.builder().body(comment).inReplyTo(mSelectedReplyCommentId).build();
    return service.createReviewComment(mRepoOwner, mRepoName, mIssueNumber, request).map(ApiHelpers::throwOnFailure);
}
Also used : ApiHelpers(com.gh4a.utils.ApiHelpers) CreateReviewComment(com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment) PullRequestReviewCommentService(com.meisolsson.githubsdk.service.pull_request.PullRequestReviewCommentService)

Aggregations

ApiHelpers (com.gh4a.utils.ApiHelpers)2 CreateReviewComment (com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment)2 PullRequestReviewCommentService (com.meisolsson.githubsdk.service.pull_request.PullRequestReviewCommentService)2