From e15fdae80f7d90f1a509a833f3de09f6c6054d82 Mon Sep 17 00:00:00 2001 From: Andrew Shoell Date: Thu, 13 Nov 2025 12:19:21 -0500 Subject: [PATCH 1/3] fix: making the github urls case insensitive Signed-off-by: Andrew Shoell --- .changeset/kind-hoops-double.md | 5 +++++ .../src/github/GithubIntegration.test.ts | 20 +++++++++++++++++++ .../src/github/GithubIntegration.ts | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .changeset/kind-hoops-double.md diff --git a/.changeset/kind-hoops-double.md b/.changeset/kind-hoops-double.md new file mode 100644 index 0000000000..fffe7986ba --- /dev/null +++ b/.changeset/kind-hoops-double.md @@ -0,0 +1,5 @@ +--- +'@backstage/integration': patch +--- + +making the github urls case insensitive diff --git a/packages/integration/src/github/GithubIntegration.test.ts b/packages/integration/src/github/GithubIntegration.test.ts index 70f1c4a16c..c54d4db2ef 100644 --- a/packages/integration/src/github/GithubIntegration.test.ts +++ b/packages/integration/src/github/GithubIntegration.test.ts @@ -134,4 +134,24 @@ describe('replaceGithubUrlType', () => { ), ).toBe('https://github.com/backstage/backstage/blob/tree/README.md'); }); + it('should replace with lowercase', () => { + expect( + replaceGithubUrlType( + 'https://githuB.com/backstage/backstage/blob/master/README.md', + 'edit', + ), + ).toBe('https://github.com/backstage/backstage/edit/master/README.md'); + expect( + replaceGithubUrlType( + 'https://github.com/Backstage/backstage/blob/master/README.md', + 'edit', + ), + ).toBe('https://github.com/backstage/backstage/edit/master/README.md'); + expect( + replaceGithubUrlType( + 'https://github.com/backstage/Backstage/blob/master/README.md', + 'edit', + ), + ).toBe('https://github.com/backstage/backstage/edit/master/README.md'); + }); }); diff --git a/packages/integration/src/github/GithubIntegration.ts b/packages/integration/src/github/GithubIntegration.ts index 880a2bed21..79d5e7f421 100644 --- a/packages/integration/src/github/GithubIntegration.ts +++ b/packages/integration/src/github/GithubIntegration.ts @@ -95,7 +95,9 @@ export function replaceGithubUrlType( return url.replace( /\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//, (_, host, owner, repo) => { - return `//${host}/${owner}/${repo}/${type}/`; + return `//${host.toLocaleLowerCase('en-US')}/${owner.toLocaleLowerCase( + 'en-US', + )}/${repo.toLocaleLowerCase('en-US')}/${type}/`; }, ); } From 01be0c2e08546b22638a499c660b44c3b8d90b5b Mon Sep 17 00:00:00 2001 From: Andrew Shoell Date: Thu, 13 Nov 2025 21:33:17 -0500 Subject: [PATCH 2/3] docs: made the changeset past tense Signed-off-by: Andrew Shoell --- .changeset/kind-hoops-double.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/kind-hoops-double.md b/.changeset/kind-hoops-double.md index fffe7986ba..68148f28b1 100644 --- a/.changeset/kind-hoops-double.md +++ b/.changeset/kind-hoops-double.md @@ -2,4 +2,4 @@ '@backstage/integration': patch --- -making the github urls case insensitive +made the github urls case insensitive From ceeed1bdb9e06945c35486fb183227b092f3755d Mon Sep 17 00:00:00 2001 From: Andrew Shoell Date: Thu, 20 Nov 2025 11:01:23 -0700 Subject: [PATCH 3/3] Fix typo in changeset description Signed-off-by: Andrew Shoell --- .changeset/kind-hoops-double.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/kind-hoops-double.md b/.changeset/kind-hoops-double.md index 68148f28b1..fd2f9f023f 100644 --- a/.changeset/kind-hoops-double.md +++ b/.changeset/kind-hoops-double.md @@ -2,4 +2,4 @@ '@backstage/integration': patch --- -made the github urls case insensitive +Made the github urls case insensitive.