getCheckRun method
Gets a single check run using its checkRunId
.
GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs.
OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
API docs: https://developer.github.com/v3/checks/runs/#get-a-single-check-run
Implementation
Future<CheckRun> getCheckRun(
RepositorySlug slug, {
required int checkRunId,
}) {
ArgumentError.checkNotNull(checkRunId);
return github.getJSON<Map<String, dynamic>, CheckRun>(
'repos/${slug.fullName}/check-runs/$checkRunId',
preview: _previewHeader,
statusCode: StatusCodes.OK,
convert: CheckRun.fromJson,
);
}