diff --git a/plugins/catalog-backend-module-github/config.d.ts b/plugins/catalog-backend-module-github/config.d.ts index 1afa013afb..1865df7753 100644 --- a/plugins/catalog-backend-module-github/config.d.ts +++ b/plugins/catalog-backend-module-github/config.d.ts @@ -68,7 +68,7 @@ export interface Config { /** * (Required, unless `organization` is set) ID of your GitHub App. */ - app?: string; + app?: number; /** * (Optional) Path where to look for `catalog-info.yaml` files. * You can use wildcards - `*` or `**` - to search the path and/or the filename @@ -146,7 +146,7 @@ export interface Config { /** * (Required, unless `organization` is set) ID of your GitHub App. */ - app?: string; + app?: number; /** * (Optional) Path where to look for `catalog-info.yaml` files. * You can use wildcards - `*` or `**` - to search the path and/or the filename diff --git a/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.ts b/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.ts index db789faf1e..40ccf2aaaa 100644 --- a/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.ts +++ b/plugins/catalog-backend-module-github/src/providers/GithubEntityProvider.ts @@ -643,18 +643,17 @@ export class GithubEntityProvider implements EntityProvider, EventSubscriber { private async addEntitiesForRepo(repository: Repository) { if (this.config.validateLocationsExist) { + const organization = repository.organization; const catalogPath = this.config.catalogPath; - const client = await this.createGraphqlClient(repository.organization); + const client = await this.createGraphqlClient(organization); const repositoryFromGithub = await getOrganizationRepository( client, - repository.organization, + organization, repository.name, catalogPath, ).then(r => - r - ? this.createRepoFromGithubResponse(r, repository.organization) - : null, + r ? this.createRepoFromGithubResponse(r, organization) : null, ); if (!repositoryFromGithub?.isCatalogInfoFilePresent) { diff --git a/plugins/catalog-backend-module-github/src/providers/GithubEntityProviderConfig.ts b/plugins/catalog-backend-module-github/src/providers/GithubEntityProviderConfig.ts index e82bc498ec..64fac09f6e 100644 --- a/plugins/catalog-backend-module-github/src/providers/GithubEntityProviderConfig.ts +++ b/plugins/catalog-backend-module-github/src/providers/GithubEntityProviderConfig.ts @@ -84,7 +84,7 @@ function readProviderConfig( if (!organization && !app) { throw new Error( - 'Error while processing GitHub provider config. Either organization or app must be set.', + 'Error while processing GitHub provider config. Either organization or app must be specified.', ); }