hosted-git-info
hosted-git-info copied to clipboard
Support non-public hosts such as GitHub Enterprise
I thought it would be best to break this out into its own issue.
Is it the intention to support non-public hosts like this?
e.g. its use might look like:
var info = hostedGitInfo.fromUrl("[email protected]:abc/def.git")
but could also look like:
var info = hostedGitInfo.fromUrl("[email protected]:abc/def.git")
There's nothing about the above that says "this is of type github" and it could just as easily be gitlab instead. But perhaps it's possible to at least return as much info as possible, e.g.
/* info looks like: { type: "unknown", domain: "code.mycompany.com", user: "abc", project: "def" } */
You may be interested in #11 and this comment - https://github.com/npm/hosted-git-info/issues/11#issuecomment-287495178
@hutson the solution above wouldn't solve the issue you're pointing to. But it would provide with a nice fallback. Would you accept a PR implementing the fallback?
Would you accept a PR implementing the fallback?
I'm not with npm. You would need to ask them :sweat_smile:
@iarna would it make sense?
(thank you @hutson)
Having this issue here https://github.com/sindresorhus/np/issues/357 and would love to see it implemented!
Hi I have solved this issue for me using an option flag {allowOtherHosts: true}. On interest pls check this fork https://github.com/spurreiter/hosted-git-info/tree/feature-allow-other-hosts. As of #11 comment I am not sure if it's worth the PR. Any advise?
the Gitlab Enterprise hosts is not supported too, like: 'git+https://oauth2:[email protected]/PATH/TO/PROJECT.git#v1.0.5'
I think this issue can be closed. In addition to #11, the maintainer @iarna commented more explicitly on #23 here that enterprise, self-hosted git hosts are out of scope for the tool named hosted-git-info.