use of com.meisolsson.githubsdk.model.request.repository.CreateCommitComment in project gh4a by slapperwan.
the class EditCommitCommentActivity method createComment.
@Override
protected Single<GitHubCommentBase> createComment(String repoOwner, String repoName, String body, long replyToCommentId) {
RepositoryCommentService service = ServiceFactory.get(RepositoryCommentService.class, false);
CreateCommitComment request = CreateCommitComment.builder().body(body).build();
String sha = getIntent().getStringExtra("commit");
return service.createCommitComment(repoOwner, repoName, sha, request).map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.repository.CreateCommitComment in project gh4a by slapperwan.
the class EditDiffCommentActivity method createComment.
@Override
protected Single<GitHubCommentBase> createComment(String repoOwner, String repoName, String body, long replyToCommentId) {
Bundle extras = getIntent().getExtras();
String commitId = extras.getString("commit_id");
RepositoryCommentService service = ServiceFactory.get(RepositoryCommentService.class, false);
CreateCommitComment request = CreateCommitComment.builder().body(body).path(extras.getString("path")).position(extras.getInt("position")).build();
return service.createCommitComment(repoOwner, repoName, commitId, request).map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.repository.CreateCommitComment in project gh4a by slapperwan.
the class CommitNoteFragment method onEditorDoSend.
@Override
public Single<?> onEditorDoSend(String comment) {
RepositoryCommentService service = ServiceFactory.get(RepositoryCommentService.class, false);
CreateCommitComment request = CreateCommitComment.builder().body(comment).build();
return service.createCommitComment(mRepoOwner, mRepoName, mObjectSha, request).map(ApiHelpers::throwOnFailure);
}
Aggregations