Fixes #13126
This commit is contained in:
Fredrik Adelöw
2022-08-16 10:07:19 +02:00
committed by GitHub
2 changed files with 10 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-github': patch
---
Fixed bug where repository filter was including all archived repositories
@@ -185,9 +185,11 @@ export class GitHubEntityProvider implements EntityProvider {
const repositoryFilter = this.config.filters?.repository;
const matchingRepositories = repositories.filter(r => {
return !r.isArchived && repositoryFilter
? repositoryFilter?.test(r.name)
: true && r.defaultBranchRef?.name;
return (
!r.isArchived &&
(!repositoryFilter || repositoryFilter.test(r.name)) &&
r.defaultBranchRef?.name
);
});
return matchingRepositories;
}