Skip to content

fetchRepo

The fetcher behind the repository pin card.

Fetch repository data.

fetchRepo(options, config: CardConfig): Promise<RepositoryData>
OptionTypeRequiredWhat it is
usernamestring | undefinedyes
reponamestring | undefinedyes
include_prs_authoredboolean | undefinedno
include_prs_commentedboolean | undefinedno
include_prs_reviewedboolean | undefinedno
include_issues_authoredboolean | undefinedno
include_issues_commentedboolean | undefinedno

Returns Promise<RepositoryData> — Repository data.

repo may carry the owner itself — octocat/hello-world — in which case it wins over username. That is what lets one option name any repository, rather than only one of the user’s own.

include_prs_authored, include_prs_commented, include_prs_reviewed, include_issues_authored and include_issues_commented each add a search request, scoped to this repository rather than to the user.