Make owner parameter optional in getAppToken and getInstallationCredentials methods

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2026-03-30 21:59:27 +02:00
parent d1124998ca
commit d96b7281dc
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -602,7 +602,7 @@ export class GithubAppCredentialsMux {
RestEndpointMethodTypes['apps']['listInstallations']['response']['data']
>;
// (undocumented)
getAppToken(owner: string, repo?: string): Promise<string | undefined>;
getAppToken(owner?: string, repo?: string): Promise<string | undefined>;
}
// @public
@@ -121,7 +121,7 @@ class GithubAppManager {
}
async getInstallationCredentials(
owner: string,
owner?: string,
repo?: string,
): Promise<{ accessToken: string | undefined }> {
// No owner means a bare host URL (e.g. https://github.com) — return an
@@ -267,7 +267,10 @@ export class GithubAppCredentialsMux {
return installs.flat();
}
async getAppToken(owner: string, repo?: string): Promise<string | undefined> {
async getAppToken(
owner?: string,
repo?: string,
): Promise<string | undefined> {
if (this.apps.length === 0) {
return undefined;
}