Skip to content

Commit 1808f1a

Browse files
committed
Ensure origin is a github repo!
1 parent 9f9143b commit 1808f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-pull-request

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def main():
7676
if(repo == '' or remote != None):
7777
origin = os.popen("git config remote.%s.url" % remote).read()
7878
origin = re.sub("(\.git)?\s*$", "", origin)
79-
m = re.search("[^/:]+/[^/]+$", origin)
79+
m = re.search(r"\bgithub\.com[:/]([^/]+/[^/]+)$", origin)
8080
if(m != None):
81-
repo = m.group()
81+
repo = m.group(1)
8282

8383
if(repo == ''):
8484
print color_text("Failed to determine github repository name",'red',True)

0 commit comments

Comments
 (0)