Skip to content

Commit e8486c2

Browse files
committed
Replace spaces with '+' in github repo_url
Signed-off-by: Omkar Phansopkar <[email protected]>
1 parent 6f38e3e commit e8486c2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/packageurl/contrib/purl2url.py

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def build_github_repo_url(purl):
153153
version_prefix = qualifiers.get("version_prefix", "")
154154
repo_url = f"{repo_url}/tree/{version_prefix}{version}"
155155

156+
repo_url = repo_url.replace(" ", "+")
157+
156158
return repo_url
157159

158160

tests/contrib/test_purl2url.py

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def test_purl2url_get_repo_url():
6868
"pkg:golang/gopkg.in/[email protected]": "https://pkg.go.dev/gopkg.in/[email protected]",
6969
"pkg:cocoapods/[email protected]": "https://cocoapods.org/pods/AFNetworking",
7070
"pkg:cocoapods/[email protected]": "https://cocoapods.org/pods/MapsIndoors",
71+
"pkg:github/facebook/[email protected]%20f4e9df48": "https://github.com/facebook/sapling/tree/0.2.20240718-145624+f4e9df48"
7172
}
7273

7374
for purl, url in purls_url.items():

0 commit comments

Comments
 (0)