Skip to content

Commit 39b751c

Browse files
committed
Merge branch 'issue-43-jsmits-github-cli'
2 parents 7de7362 + 94409ed commit 39b751c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/github/utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ def get_remote_info():
5656
if result:
5757
return result.groups()
5858
else:
59+
# Whilst repos are usually configured with a postfix of ".git"
60+
# this is by convention only. Github happily handles requests
61+
# without the postfix.
62+
pattern = re.compile(r'([^:/]+)/([^/]+)')
63+
result = pattern.search(line)
64+
if result:
65+
return result.groups()
5966
raise Exception("invalid user and repo name")
6067
elif stderr:
6168
for line in stderr.splitlines():

0 commit comments

Comments
 (0)