Skip to content

fetchOrganization

The fetcher behind the organization card.

Fetch an organization and the totals of its public repositories.

Only public, non-fork repositories are counted, most-starred first, and at most five pages of 100 — truncated says when the walk stopped early.

fetchOrganization(options, config: CardConfig): Promise<OrganizationData>
OptionTypeRequiredWhat it is
orgstring | undefinedyes

Returns Promise<OrganizationData> — The organization data.

The login is the name in github.com/<org>, and it is checked against GitHub’s own login shape before any request is made. A login that resolves to nothing — or to a user rather than an organization — is a not_found.

One request reads the organization and 100 of its public, non-fork repositories, most-starred first; the walk follows the cursor for up to five of those pages. Every total but publicRepos is a sum over the repositories it saw — stars, forks, watchers, open issues, open pull requests, releases and default-branch commits — and truncated says whether it saw them all. publicRepos is GitHub’s own count either way.

A page costs one point of the GraphQL rate limit whichever of those figures a card ends up drawing: the counts ride on the repositories the walk was already reading.