feat(catalog): implement discovery by GitHub app
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -201,9 +201,11 @@ class GithubAppManager {
|
||||
export class GithubAppCredentialsMux {
|
||||
private readonly apps: GithubAppManager[];
|
||||
|
||||
constructor(config: GithubIntegrationConfig) {
|
||||
constructor(config: GithubIntegrationConfig, appIds: number[] = []) {
|
||||
this.apps =
|
||||
config.apps?.map(ac => new GithubAppManager(ac, config.apiBaseUrl)) ?? [];
|
||||
config.apps
|
||||
?.filter(app => (appIds.length ? appIds.includes(app.appId) : true))
|
||||
.map(ac => new GithubAppManager(ac, config.apiBaseUrl)) ?? [];
|
||||
}
|
||||
|
||||
async getAllInstallations(): Promise<
|
||||
|
||||
Reference in New Issue
Block a user