fetchRepo
The fetcher behind the repository pin card.
Fetch repository data.
fetchRepo(options, config: CardConfig): Promise<RepositoryData>| Option | Type | Required | What it is |
|---|---|---|---|
username | string | undefined | yes | — |
reponame | string | undefined | yes | — |
searches | readonly ("issues_commented" | "issues_opened" | "prs_commented" | "prs_opened" | "prs_reviewed")[] | undefined | no | The search-based counts to fetch, within this repository. |
include_topics | boolean | undefined | no | — |
Returns Promise<RepositoryData> — Repository data.
Naming the repository
Section titled “Naming the repository”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.
The optional counts
Section titled “The optional counts”Each entry of searches — prs_opened, prs_commented, prs_reviewed, issues_opened or
issues_commented — adds a search request, scoped to this repository rather than to the user.
include_topics asks the same request for the repository’s topics, returned as topics, their
names in GitHub’s order.