(repo_info: GithubRepoInfo, options?: { cache?: Map<string, { key: string; url: string; params: any; value: any; etag: string | null; last_modified: string | null; }> | undefined; ... 4 more ...; fetch?: { ...; } | undefined; }): Promise<...> import {fetch_github_check_runs} from '@fuzdev/fuz_repos/github.js'; Fetches the check runs on ref and reduces them to one overall status and
conclusion.
repo_info
the repo's GitHub owner and name
options
the cache, logger, token, API version, ref (main by default), and fetch
{ cache?: Map<string, { key: string; url: string; params: any; value: any; etag: string | null; last_modified: string | null; }> | undefined; log?: Logger | undefined; token?: string | undefined; api_version?: string | undefined; ref?: string | undefined; fetch?: { ...; } | undefined; }{}returns
Promise<Result>
the reduced check runs, null for a ref with none (a repo without CI, or a commit CI skipped), or a failure when the request or its parse failed
throws
Error- on a 401 response (check `SECRET_GITHUB_API_TOKEN`) or a repo without an owner