From 686395e75c2b11b46d8f03fb5cc964dc63b9b492 Mon Sep 17 00:00:00 2001 From: npiyush97 Date: Fri, 11 Aug 2023 09:50:42 +0530 Subject: [PATCH 1/5] fixed issue related to satisfiesVisibilityFilter case-sensitive Signed-off-by: npiyush97 --- plugins/catalog-backend-module-github/src/lib/util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-github/src/lib/util.ts b/plugins/catalog-backend-module-github/src/lib/util.ts index bb91e9dd2a..58ae8d6551 100644 --- a/plugins/catalog-backend-module-github/src/lib/util.ts +++ b/plugins/catalog-backend-module-github/src/lib/util.ts @@ -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); } From 81c231c9c9eebe7dc91664a6d5e984967857c659 Mon Sep 17 00:00:00 2001 From: npiyush97 Date: Fri, 11 Aug 2023 09:56:53 +0530 Subject: [PATCH 2/5] added changeset Signed-off-by: npiyush97 --- .changeset/ninety-panthers-guess.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/ninety-panthers-guess.md diff --git a/.changeset/ninety-panthers-guess.md b/.changeset/ninety-panthers-guess.md new file mode 100644 index 0000000000..cc6d531aac --- /dev/null +++ b/.changeset/ninety-panthers-guess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +changed visibilityfilter and visibility to lowercase to prevent case-sensitive error. From 039c3fac5c475a514073267ffbd037ffa81a818d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 13 Aug 2023 11:42:08 +0200 Subject: [PATCH 3/5] Update .changeset/ninety-panthers-guess.md Signed-off-by: Patrik Oldsberg --- .changeset/ninety-panthers-guess.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/ninety-panthers-guess.md b/.changeset/ninety-panthers-guess.md index cc6d531aac..0438157bf5 100644 --- a/.changeset/ninety-panthers-guess.md +++ b/.changeset/ninety-panthers-guess.md @@ -2,4 +2,4 @@ '@backstage/plugin-catalog-backend-module-github': patch --- -changed visibilityfilter and visibility to lowercase to prevent case-sensitive error. +Fixed a bug where the visibility filter was case sensitive and casting was inconsistent. From 1bed05bbab1105384d2af5da5899c5085fc47d9a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 13 Aug 2023 15:20:46 +0200 Subject: [PATCH 4/5] Update .changeset/ninety-panthers-guess.md Signed-off-by: Patrik Oldsberg --- .changeset/ninety-panthers-guess.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/ninety-panthers-guess.md b/.changeset/ninety-panthers-guess.md index 0438157bf5..a4b58718e5 100644 --- a/.changeset/ninety-panthers-guess.md +++ b/.changeset/ninety-panthers-guess.md @@ -2,4 +2,5 @@ '@backstage/plugin-catalog-backend-module-github': patch --- -Fixed a bug where the visibility filter was case sensitive and casting was inconsistent. +Fixed a bug where the visibility filter was case sensitive and casting was inconsistent. + From b8ff69c541d11526e169150e97744f5bb5b66272 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 14 Aug 2023 09:26:30 +0200 Subject: [PATCH 5/5] format changeset Signed-off-by: Patrik Oldsberg --- .changeset/ninety-panthers-guess.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/ninety-panthers-guess.md b/.changeset/ninety-panthers-guess.md index a4b58718e5..a821731a22 100644 --- a/.changeset/ninety-panthers-guess.md +++ b/.changeset/ninety-panthers-guess.md @@ -3,4 +3,3 @@ --- Fixed a bug where the visibility filter was case sensitive and casting was inconsistent. -