Closed yocontra closed 10 years ago
The git@ version actually has .git on the end. git@github.com:videojs/video.js.git
The regex here wouldn't work for that, since it assume you need up to the end of the line.
Just added #65 which makes it a little more complicated...
Well actually, it looks like github adds .git on the end of http remotes too. https://github.com/user/repo.git
I think #65 fixes both issues. You can try this in the console.
/URL:.*?([\w\-]+\/[\w\-\.]+)\.git/.exec('URL: https://github.com/user/repo.git')
> ["URL: https://github.com/user/repo.git", "user/repo"]
:+1: I just fixed this myself before discovering this ticket :\
The regex /URL:.*?([\w-]+\/[\w-]+)/ used to get the repo name only works on git@github.com:user/repo and not on https://github.com/user/repo which is also a valid remote.
Changing the regex fixes this