fetch_repo_data.ts

Declarations
#

view source

fetch_repo_data
#

fetch_repo_data.ts view source

(resolved_repos: LocalRepo[], token?: string | undefined, cache?: Map<string, { key: string; url: string; params: any; value: any; etag: string | null; last_modified: string | null; }> | undefined, log?: Logger | undefined, delay?: number, github_api_version?: string | undefined): Promise<...>

Fetches GitHub metadata (CI status, PRs) for all repos.

Fetches sequentially with delay between requests to respect GitHub API rate limits. Uses await_in_loop intentionally to avoid parallel requests overwhelming the API.

Error handling: Logs fetch failures but continues processing remaining repos. Repos with failed fetches will have null for check_runs or pull_requests.

resolved_repos

type LocalRepo[]

token?

type string | undefined
optional

cache?

optional cache from belt's fetch.js for response memoization

type Map<string, { key: string; url: string; params: any; value: any; etag: string | null; last_modified: string | null; }> | undefined
optional

log?

type Logger | undefined
optional

delay

milliseconds between API requests (default: 33ms)

type number
default 33

github_api_version?

type string | undefined
optional

returns

Promise<RepoJson[]>

array of Repo objects with GitHub metadata attached

Depends on
#

Imported by
#