Fix bug in root repo import where catalog-info.yaml.hcl file breaks import
Signed-off-by: sblausten <sam@roadie.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-github': patch
|
||||
---
|
||||
|
||||
Fix bug in root repo import where catalog-info.yaml.hcl file is found by search and breaks the import
|
||||
@@ -76,8 +76,13 @@ export class GithubLocationAnalyzer implements ScmLocationAnalyzer {
|
||||
const { owner, name: repo } = parseGitUrl(url);
|
||||
|
||||
const catalogFile = catalogFilename || 'catalog-info.yaml';
|
||||
const fileParts = catalogFile.split('.');
|
||||
const extension =
|
||||
fileParts.length > 0
|
||||
? `extension:${fileParts[fileParts.length - 1]}`
|
||||
: '';
|
||||
|
||||
const query = `filename:${catalogFile} repo:${owner}/${repo}`;
|
||||
const query = `filename:${catalogFile} ${extension} repo:${owner}/${repo}`;
|
||||
|
||||
const integration = this.integrations.github.byUrl(url);
|
||||
if (!integration) {
|
||||
|
||||
Reference in New Issue
Block a user