From d96b7281dcacb00b1b3a1f6deb1f3105b854b09e Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Mon, 30 Mar 2026 21:59:27 +0200 Subject: [PATCH] Make owner parameter optional in getAppToken and getInstallationCredentials methods Signed-off-by: Vincenzo Scamporlino --- packages/integration/report.api.md | 2 +- .../src/github/SingleInstanceGithubCredentialsProvider.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/integration/report.api.md b/packages/integration/report.api.md index df1c7e9112..af28eeebea 100644 --- a/packages/integration/report.api.md +++ b/packages/integration/report.api.md @@ -602,7 +602,7 @@ export class GithubAppCredentialsMux { RestEndpointMethodTypes['apps']['listInstallations']['response']['data'] >; // (undocumented) - getAppToken(owner: string, repo?: string): Promise; + getAppToken(owner?: string, repo?: string): Promise; } // @public diff --git a/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.ts b/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.ts index f48434bbf6..3ecaa05e0c 100644 --- a/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.ts +++ b/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.ts @@ -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 { + async getAppToken( + owner?: string, + repo?: string, + ): Promise { if (this.apps.length === 0) { return undefined; }