getCommitDiff method

Future<String> getCommitDiff(
  1. RepositorySlug slug,
  2. String sha
)

Implementation

Future<String> getCommitDiff(RepositorySlug slug, String sha) async {
  ArgumentError.checkNotNull(slug);
  ArgumentError.checkNotNull(sha);
  return github
      .request(
        'GET',
        '/repos/${slug.fullName}/commits/$sha',
        headers: <String, String>{
          'Accept': 'application/vnd.github.VERSION.diff'
        },
        statusCode: StatusCodes.OK,
      )
      .then((r) => r.body);
}