listCommits method Null safety

Stream<RepositoryCommit> listCommits(
  1. RepositorySlug slug,
  2. int number
)

Lists the commits in a pull request.

API docs: https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request

Implementation

Stream<RepositoryCommit> listCommits(RepositorySlug slug, int number) {
  return PaginationHelper(github).objects(
      'GET',
      '/repos/${slug.fullName}/pulls/$number/commits',
      (dynamic i) => RepositoryCommit.fromJson(i));
}