diff --git a/app-config.yaml b/app-config.yaml index dd72051189..c0f5767a45 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -212,12 +212,12 @@ catalog: pullRequestBranchName: backstage-integration rules: - allow: - - Component - - API - - Resource - - System - - Domain - - Location + - Component + - API + - Resource + - System + - Domain + - Location processors: ldapOrg: diff --git a/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts index c9e0f7c619..f4b9f5ea59 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.test.ts @@ -225,7 +225,7 @@ describe('DefaultCatalogRulesEnforcer', () => { const enforcer = DefaultCatalogRulesEnforcer.fromConfig( new ConfigReader({ catalog: { - rules: [{ allow: ['Component'], locations: [{type: 'url', match: 'https://github.com/b/*'}] }], + rules: [{ allow: ['Component'], locations: [{ type: 'url', match: 'https://github.com/b/*' }] }], }, }), ); diff --git a/plugins/catalog-backend/src/ingestion/CatalogRules.ts b/plugins/catalog-backend/src/ingestion/CatalogRules.ts index 43d865c4d2..0d013dc78b 100644 --- a/plugins/catalog-backend/src/ingestion/CatalogRules.ts +++ b/plugins/catalog-backend/src/ingestion/CatalogRules.ts @@ -99,13 +99,13 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { }; const locConf = ruleConfig.getOptionalConfigArray('locations'); - if (locConf) - rule.locations = locConf.map( locationConfig => ({ - match: locationConfig.getOptionalString('match'), - type: locationConfig.getString('type'), - target: locationConfig.getOptionalString('target') - })) - + if (locConf) + rule.locations = locConf.map(locationConfig => ({ + match: locationConfig.getOptionalString('match'), + type: locationConfig.getString('type'), + target: locationConfig.getOptionalString('target') + })) + return rule; }); rules.push(...globalRules); @@ -135,7 +135,7 @@ export class DefaultCatalogRulesEnforcer implements CatalogRulesEnforcer { return new DefaultCatalogRulesEnforcer(rules); } - constructor(private readonly rules: CatalogRule[]) {} + constructor(private readonly rules: CatalogRule[]) { } /** * Checks whether a specific entity/location combination is allowed