getReviewComments method

Future<Iterable<ReviewComment>> getReviewComments({
  1. required String repo,
  2. required int num,
})

gh api
-H "Accept: application/vnd.github.v3+json"
/repos/{repo}/pulls/{num}/comments

Implementation

Future<Iterable<ReviewComment>> getReviewComments({
  required String repo,
  required int num,
}) async {
  final result = await _runner.run([
    'api',
    '-H',
    'Accept: application/vnd.github.v3+json',
    '/repos/$repo/pulls/$num/comments',
  ]);

  return (jsonDecode(result) as List)
      .map((json) => ReviewComment.fromJson(json));
}