Skip to content

Commit 2af8488

Browse files
committed
git remote -v does not necessarily have http or https in the url
1 parent 23308b9 commit 2af8488

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jupyterlab_gitplus/handlers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717

1818
GITHUB_ENDPOINT = 'https://github.com/'
19+
GITHUB_REMOTE_DOMAIN = 'github.com'
1920
REVIEWNB_ENDPOINT = 'https://app.reviewnb.com/'
2021

2122

@@ -36,7 +37,7 @@ def post(self):
3637
try:
3738
repo = Repo(file['path'], search_parent_directories=True)
3839

39-
if GITHUB_ENDPOINT not in repo.remotes.origin.url:
40+
if GITHUB_REMOTE_DOMAIN not in repo.remotes.origin.url:
4041
logger.info('File is not a part of GitHub repository: ' + file['path'])
4142
elif repo.working_dir not in unique_paths:
4243
unique_paths.add(repo.working_dir)

0 commit comments

Comments
 (0)