Skip to content

Commit

Permalink
Fixed github URL parsing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mluypaert committed Jul 16, 2020
1 parent a243e0a commit 5a917c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/azanium/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import git
import github3

import urllib.parse

from . import config

Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 5a917c4

Please sign in to comment.