Merge pull request #19333 from npiyush97/fix-18745

Fix 18745 Visibility filter in the GithubEntityProvider is case-sensitive
This commit is contained in:
Patrik Oldsberg
2023-08-14 09:46:12 +02:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-github': patch
---
Fixed a bug where the visibility filter was case sensitive and casting was inconsistent.
@@ -107,5 +107,10 @@ export function satisfiesVisibilityFilter(
if (!visibilities.length) {
return true;
}
return visibilities.includes(visibility);
const lowerCaseVisibilities = visibilities.map(v =>
v.toLocaleLowerCase('en-US'),
);
const lowerCaseVisibility = visibility.toLocaleLowerCase('en-US');
return lowerCaseVisibilities.includes(lowerCaseVisibility);
}