MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / githubRequest

Function githubRequest

apps/web/src/lib/github/open-pull-request-counts.ts:362–380  ·  view source on GitHub ↗
(url: string, init?: RequestInit)

Source from the content-addressed store, hash-verified

360}
361
362async function githubRequest(url: string, init?: RequestInit): Promise<Response> {
363 const token = getGithubTokenOrThrow();
364 return fetchWithBackoff(
365 url,
366 {
367 ...init,
368 headers: {
369 Accept: 'application/vnd.github+json',
370 Authorization: `Bearer ${token}`,
371 'X-GitHub-Api-Version': '2022-11-28',
372 ...(init?.headers ?? {}),
373 },
374 },
375 {
376 retryResponse: r => r.status === 429 || r.status >= 500,
377 maxDelayMs: 10_000,
378 }
379 );
380}
381
382async function listOpenPullRequestAuthors(options: {
383 repo: RepoRef;

Calls 2

fetchWithBackoffFunction · 0.90
getGithubTokenOrThrowFunction · 0.70

Tested by

no test coverage detected