Drop trailing slash from GitLab package links

This matches the default URL for GitLab repositories.
This commit is contained in:
Evangelos Foutras 2023-05-19 23:23:32 +03:00
parent 262d7f1945
commit 7bb1f08b68
No known key found for this signature in database
GPG Key ID: 51E8B148A9999C34

View File

@ -24,7 +24,7 @@ def details_link(pkg):
def scm_link(package, operation: str):
pkgbase = urlquote(gitlab_project_name_to_path(package.pkgbase))
if operation == 'tree':
return f'{settings.GITLAB_PACKAGES_REPO}/{pkgbase}/'
return f'{settings.GITLAB_PACKAGES_REPO}/{pkgbase}'
elif operation == 'commits':
return f'{settings.GITLAB_PACKAGES_REPO}/{pkgbase}/-/commits/main'