Skip to content

getRepoInstallation

getRepoInstallation(creds, repo, opts?): Promise<GitHubAppInstallation | undefined>

Defined in: app-info/app-info.ts:253

The installation of the App this JWT identifies on one repository (GET /repos/{repo}/installation), or undefined when the App is not installed there (404). A caller with no webhook to read the installation id from (a scheduled job) finds it here before it asks for an installation token. Needs only the App’s own JWT.

repo must be exactly owner/name: anything else (extra segments, an empty segment, . or ..) throws before a request is made, and each segment is URL-encoded, so a malformed value can never reach another route.

https://docs.github.com/en/rest/apps/apps#get-a-repository-installation-for-the-authenticated-app

GitHubAppCredentials

string

Pick<GitHubClientOptions, "baseUrl" | "fetch"> = {}

Promise<GitHubAppInstallation | undefined>

Error when repo is not owner/name.