diff --git a/.changeset/polite-pillows-accept.md b/.changeset/polite-pillows-accept.md new file mode 100644 index 0000000000..ece7c02ee1 --- /dev/null +++ b/.changeset/polite-pillows-accept.md @@ -0,0 +1,5 @@ +--- +'@backstage/integration': patch +--- + +Rollback the lowercase replacing in GitHub integration config diff --git a/packages/integration/src/github/GithubIntegration.test.ts b/packages/integration/src/github/GithubIntegration.test.ts index c54d4db2ef..70f1c4a16c 100644 --- a/packages/integration/src/github/GithubIntegration.test.ts +++ b/packages/integration/src/github/GithubIntegration.test.ts @@ -134,24 +134,4 @@ 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 79d5e7f421..880a2bed21 100644 --- a/packages/integration/src/github/GithubIntegration.ts +++ b/packages/integration/src/github/GithubIntegration.ts @@ -95,9 +95,7 @@ export function replaceGithubUrlType( return url.replace( /\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//, (_, host, owner, repo) => { - return `//${host.toLocaleLowerCase('en-US')}/${owner.toLocaleLowerCase( - 'en-US', - )}/${repo.toLocaleLowerCase('en-US')}/${type}/`; + return `//${host}/${owner}/${repo}/${type}/`; }, ); }