Skip to content

Commit 698b703

Browse files
authored
Convert a repository url from SSH to HTTPS. (#1120)
* Convert a repository url from SSH to HTTPS. * execute npm run format
1 parent 5129c33 commit 698b703

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Packages.res

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,14 @@ let parsePkgs = data => {
501501
->Resource.filterKeywords
502502
->Resource.uniqueKeywords
503503

504+
// Convert a repository url from SSH to HTTPS.
505+
let repositoryHref = switch repositoryHref {
506+
| href if String.startsWith(href, "git+ssh") => String.replace(href, "git+ssh:", "https:")
507+
| href if String.startsWith(href, "git+") => String.replace(href, "git+", "")
508+
| href if String.startsWith(href, "git:") => String.replace(href, "git:", "https:")
509+
| href => href
510+
}
511+
504512
Some({
505513
name,
506514
version,

0 commit comments

Comments
 (0)