Recognize GitHub git urls
Closed this issue · 7 comments
When something is a git
URL but is actually for a GitHub repository we could be clever and download the tarball instead (providing they aren't using authentication in the git url). This would be useful for environments without git installed. Depends on #20.
We can use github-url-from-git
Sadly github-url-from-git
does not expose the regex it uses - so after we got a result (github url) we have to parse the url again to get the username/repo
for our npm.github
method.
Should I send TJ a pull request to expose the url?
Should we change the arguments our npm.github
takes?
Yes, we could do with our own, more powerful git detection library since we need to detect branch/tag/commit as well as user and repo.
The npm
-family would definetly need one place to handle all that git/github stuff:
https://github.com/isaacs/npm-www/blob/master/models/showprofile.js#L40
Currently on another task, but can start this night/tomorrow night with it.
https://github.com/ForbesLindesay/discern is well underway, and in use with this library.