divinites / gissues

A sublime text plug-in to manage GitHub repo issues :fire:
11 stars 2 forks source link

[Bug] Can not open issues list with 'dot' in the repo naming #113

Closed JimmyLv closed 7 years ago

JimmyLv commented 7 years ago

Actually, my repo name is https://github.com/JimmyLv/jimmylv.github.io, but issues cannot be retrieved correctly.

image

divinites commented 7 years ago

I will look into this problem as soon as possible. As a workaround, I manually entered the repo, it works fine.

divinites commented 7 years ago

And to help me figure out the problem, could you please add "debug": 1, in github_issue.sublime-settings and restart sublime text to see the log output in the command console?

JimmyLv commented 7 years ago

Thanks for your quick reply, I set the "debug": 1 and got the following error msg:

GitHub Issue >>> find username JimmyLv and repo_name jimmylv
GitHub Issue >>> I am showing the issue list!
GitHub Issue >>> The first 8 digits of your GitHub Token is db1c9958
GitHub Issue >>> Your own username is 
Could not import subprocess32 module, falling back to subprocess module
GitHub Issue >>> the joint url is https://api.github.com/repos/JimmyLv/jimmylv/issues
GitHub Issue >>> the joint url is https://api.github.com/repos/JimmyLv/jimmylv/issues
Exception in thread Thread-18:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "libgit.issue in /Users/Jing/Library/Application Support/Sublime Text 3/Installed Packages/GitHubIssue.sublime-package", line 28, in run
Exception: Cannnot find relevant repo info, please check the input!
divinites commented 7 years ago

Thanks. I believe the problem is here: find username JimmyLv and repo_name jimmylv

should not be a difficult fix though. I will aim at doing it later today or tomorrow. I will put a new version to the package channel when it finishes.

JimmyLv commented 7 years ago

Yep, not sure why it extract the wrong repo_name. Thank you very much, the workaround works fine for me too. 👍

divinites commented 7 years ago

I've seen the point. It is a subtle error of my regex for splitting git urls: ^\s*url\s*=\s*(?P<host>(git@|https://)([\w\.@]+)(/|:))(?P<owner>[\w,\-,\_]+)/(?P<repo>[\w,\-,\_]+)(.git){0,1}((/){0,1})

since https://github.com/JimmyLv/jimmylv.github.io also has a .git in the middle the regex expression thinks that the URL ends there and returns jimmylv as the repo name.