diff --git a/dashboard/common/utils.py b/dashboard/common/utils.py index 7962a897..cb27c1b9 100644 --- a/dashboard/common/utils.py +++ b/dashboard/common/utils.py @@ -13,9 +13,11 @@ def format_github_url_using_https(github_url: str): ssh_base = "git@" https_base = "https://" - # If the URL is formatted for SSH, convert, otherwise, do nothing + # If the URL is formatted for SSH, convert, otherwise, replace .git extension with "" if ssh_base == github_url[:len(ssh_base)]: github_url = github_url.replace(":", "/").replace(".git", "").replace(ssh_base, https_base) + else: + github_url = github_url.replace(".git", "") return github_url