Revert "fix: making the github urls case insensitive" (#32220)
Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/integration': patch
|
||||
---
|
||||
|
||||
Rollback the lowercase replacing in GitHub integration config
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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}/`;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user