From ba990de8dcb0eef27d783d2c4db324b1687c1498 Mon Sep 17 00:00:00 2001 From: niurcaq <110949195+niurcaq@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:57:27 -0400 Subject: [PATCH] changes to issue #1358 regarding .git extension (#1571) Co-authored-by: Niurca Quirarte --- dashboard/common/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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