Skip to content

Commit 14c6044

Browse files
refactor: use normalizeGitUrl from git-provider.ts
1 parent cb93d64 commit 14c6044

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

app/composables/useRepositoryUrl.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
import { joinURL } from 'ufo'
22

3-
function normalizeGitUrl(url: string): string {
4-
return url
5-
.replace(/^git\+/, '')
6-
.replace(/^git:\/\//, 'https://')
7-
.replace(/\.git$/, '')
8-
.replace(/^ssh:\/\/git@github\.com/, 'https://github.com')
9-
.replace(/^git@github\.com:/, 'https://github.com/')
10-
}
11-
123
type RequestedVersion = SlimPackument['requestedVersion'] | null
134

145
type UseRepositoryUrlReturn = {

0 commit comments

Comments
 (0)