From 5a917c4b3d76fc7920fc4110f587e62906e8ba25 Mon Sep 17 00:00:00 2001 From: Manuel Luypaert Date: Thu, 16 Jul 2020 17:41:37 +0100 Subject: [PATCH] Fixed github URL parsing issue --- src/azanium/github.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/azanium/github.py b/src/azanium/github.py index 94b60f4..36b6b83 100644 --- a/src/azanium/github.py +++ b/src/azanium/github.py @@ -5,6 +5,7 @@ import git import github3 +import urllib.parse from . import config @@ -73,7 +74,7 @@ def download_release_binary(repo_path, tag, to_directory=None, gh=github3): def infer_from_local_repo(path=None, gh=github3): path = path if path else os.getcwd() git_url = git.Repo(path).remotes.origin.url - (org, repo_name) = git_url.rsplit(':')[1].rsplit('.')[0].split('/') + (org, repo_name) = urllib.parse.urlparse(git_url).path.split('.')[0].split('/')[1:] return gh.repository(org, repo_name)