Skip to content

Commit

Permalink
changes to issue #1358 regarding .git extension (#1571)
Browse files Browse the repository at this point in the history
Co-authored-by: Niurca Quirarte <niurcaq@umich.edu>
  • Loading branch information
niurcaq and Niurca Quirarte committed Apr 25, 2024
1 parent 0e1503e commit ba990de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dashboard/common/utils.py
Expand Up @@ -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


Expand Down

0 comments on commit ba990de

Please sign in to comment.