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 | undefinedoptional
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; }> | undefinedoptional
log?
type
Logger | undefinedoptional
delay
milliseconds between API requests (default: 33ms)
type
number default
33github_api_version?
type
string | undefinedoptional
returns
Promise<RepoJson[]> array of Repo objects with GitHub metadata attached