MCPcopy Create free account
hub / github.com/cli/cli / constructor

Method constructor

evals/src/core/github.ts:39–43  ·  view source on GitHub ↗
(
    private readonly token: string,
    private readonly request: typeof fetch = fetch,
    private readonly retryDelaysMs: number[] = [2_000, 5_000, 10_000, 20_000],
  )

Source from the content-addressed store, hash-verified

37/** A minimal GitHub REST client for fixtures, actors, and snapshots, with retries for transient failures. */
38export class GitHub {
39 constructor(
40 private readonly token: string,
41 private readonly request: typeof fetch = fetch,
42 private readonly retryDelaysMs: number[] = [2_000, 5_000, 10_000, 20_000],
43 ) {}
44
45 async api<T>(method: string, path: string, body?: unknown): Promise<T> {
46 return (await this.page<T>(method, path, body)).body;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected