chore(catalog): update config.d.ts; clean up code
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
+2
-2
@@ -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.',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user