jaxbot / github-issues.vim

Github issue lookup in Vim
http://jaxbot.me/articles/github-issues-vim-plugin-5-7-2014
Other
405 stars 28 forks source link

Error connecting to projects with .git in the repo name #132

Closed wireframe closed 9 years ago

wireframe commented 9 years ago

I have a public project/blog hosted on github and the vim plugin blows up when trying to run Gissues

"gissues/wireframe/wireframe/issues"  1 line --100%--                                                                                                                             
github-issues.vim: An error occurred. If this is a private repo, make sure you have a github_access_token defined. Call: /labels on wireframe/wireframe                           
HTTP Error 404: Not Found   

Looks like it's an issue with the dot in the project name (which is the standard naming convention for github pages repositories).

jaxbot commented 9 years ago

I don't think it's the dot that's causing this; github-issues.vim and other repos have dots in the name and the plugin finds them fine. I wonder if it's the github.com part of the URL that is getting clipped off.

Can you post the output of git remote -v ? It's fine if you remove any non-github remotes or other personally identifiable info.

jaxbot commented 9 years ago

Never mind, I'm able to reproduce the issue by forking your repo. Looks like the problem resides in the hardcoding of splitting .git out of repo names. This was done because some repos urls end with .git, which needs to be removed to get the path for the API call. Fix is en route.

  filepath = filepath.split(os.path.sep+".git")[0]
jaxbot commented 9 years ago

Seems to be fixed when I try it on a fork of your repo

wireframe commented 9 years ago

yep! just pulled the latest version and the issues load right up.

Thanks!

jaxbot commented 9 years ago

No problem! Thanks for reporting it