chore(catalog): update config.d.ts; clean up code

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2025-08-14 17:53:06 +02:00
parent a2354a23b5
commit 7d38a7bc5e
3 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -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
@@ -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) {
@@ -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.',
);
}