From 73366a8300df0290c58612de05b63acbe62683ba Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 30 Oct 2020 10:44:12 -0400 Subject: [PATCH] .git is optional on git remotes --- distriploy/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distriploy/github.py b/distriploy/github.py index 3756410..9625a17 100644 --- a/distriploy/github.py +++ b/distriploy/github.py @@ -34,11 +34,11 @@ def get_remote(target_repo, cfg_root): res = subprocess.run(cmd, stdout=subprocess.PIPE, cwd=target_repo) url = res.stdout.rstrip().decode() - m = re.match(r"^git@github.com:(?P\S+)\.git$", url) + m = re.match(r"^git@github.com:(?P\S+)(\.git)?$", url) if m is not None: return m.group("repo") - m = re.match(r"^https://github.com/(?P\S+)\.git$", url) + m = re.match(r"^https://github.com/(?P\S+)(\.git)?$", url) if m is not None: return m.group("repo")