From e51d8210233ac759e7f7dfebc2c4f1bf6ce94802 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Thu, 23 Jan 2025 07:55:20 +0000 Subject: [PATCH] Merge commit from fork --- src/github/GithubInstance.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/github/GithubInstance.ts b/src/github/GithubInstance.ts index 4a532750..1d9b266a 100644 --- a/src/github/GithubInstance.ts +++ b/src/github/GithubInstance.ts @@ -153,7 +153,15 @@ export class GithubInstance { do { const installations = await this.internalOctokit.apps.listInstallations({ per_page: 100, page: page++ }); for (const install of installations.data) { - await this.addInstallation(install); + if (install.suspended_at) { + log.warn(`GitHub app install ${install.id} was suspended. GitHub connections using this install may not work correctly`); + continue; + } + try { + await this.addInstallation(install); + } catch (ex) { + log.info(`Failed to handle GitHub installation ${install.id}`, ex); + } } installPageSize = installations.data.length; } while(installPageSize === 100)