(
private readonly token: string,
private readonly request: typeof fetch = fetch,
private readonly retryDelaysMs: number[] = [2_000, 5_000, 10_000, 20_000],
)
| 37 | /** A minimal GitHub REST client for fixtures, actors, and snapshots, with retries for transient failures. */ |
| 38 | export 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; |
nothing calls this directly
no outgoing calls
no test coverage detected