createComment method
Future<IssueComment>
createComment(
- RepositorySlug slug,
- int number,
- CreatePullRequestComment comment
Creates a new pull request comment.
API docs: https://developer.github.com/v3/pulls/comments/#create-a-comment
Implementation
Future<IssueComment> createComment(
RepositorySlug slug, int number, CreatePullRequestComment comment) {
return github.postJSON('/repos/${slug.fullName}/pulls/$number/comments',
body: GitHubJson.encode(comment.toJson()),
convert: (dynamic i) => PullRequestComment.fromJson(i),
statusCode: 201) as Future<IssueComment>;
}