mirror of
https://github.com/stablyai/orca.git
synced 2026-10-15 00:02:48 +00:00
Fix GitLab hosted source links
This commit is contained in:
@@ -50,7 +50,7 @@ describe('hosted remote URLs', () => {
|
||||
|
||||
expect(
|
||||
buildHostedRemoteFileUrl('git@gitlab.com:group/sub/repo.git', 'src/a.ts', 'feature/x', 9)
|
||||
).toBe('https://gitlab.com/group/sub/repo/tree/feature%2Fx/src/a.ts#L9')
|
||||
).toBe('https://gitlab.com/group/sub/repo/-/blob/feature%2Fx/src/a.ts#L9')
|
||||
|
||||
expect(
|
||||
buildHostedRemoteFileUrl('git@bitbucket.org:team/repo.git', 'src/a.ts', 'feature/x', 7)
|
||||
|
||||
@@ -117,7 +117,7 @@ export function buildHostedRemoteFileUrl(
|
||||
return `${baseUrl}/blob/${encodedBranch}${filePathSuffix}#L${line}`
|
||||
}
|
||||
if (remote.provider === 'gitlab') {
|
||||
return `${baseUrl}/tree/${encodedBranch}${filePathSuffix}#L${line}`
|
||||
return `${baseUrl}/-/blob/${encodedBranch}${filePathSuffix}#L${line}`
|
||||
}
|
||||
return `${baseUrl}/src/${encodedBranch}${filePathSuffix}#L${line}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user