getCommit method
Fetches the specified commit.
API docs: https://developer.github.com/v3/repos/commits/#get-a-single-commit
Implementation
Future<RepositoryCommit> getCommit(RepositorySlug slug, String sha) async {
ArgumentError.checkNotNull(slug);
ArgumentError.checkNotNull(sha);
return github.getJSON<Map<String, dynamic>, RepositoryCommit>(
'/repos/${slug.fullName}/commits/$sha',
convert: RepositoryCommit.fromJson,
statusCode: StatusCodes.OK,
);
}