GitHub Enterprise URLs aren't supported
It also appears that github-url-from-git doesn't support non-GitHub URLs, which is part of the problem.
Opening this ticket so I can research further.
Which URL are you using (feel free to censor out the sensitive parts, I just want to reproduce this)?
Also, looking at github-url-from-git's readme, it seems like they do support GitHub Enterprise URL's.
If this is an issue specific to github-url-from-git, you should open an issue over there.
I'm encountering the same issue. The value of repository.url in my package.json is [email protected]:org-name/repo-name.git.
Based on the github-url-from-git's readme, it looks like you need to pass in the enterprise base URL via the extraBaseUrls option.
I'm happy to open a PR, but I'm not sure if the right solution is to:
- Let the user pass in
--git-base-urlsto configuregithub-url-from-git'sextraBaseUrlsoption - Write some logic that would automatically detect the baseUrl of a git
#1 sounds good to me.
Great! After that's added, the enterprise repo url will get passed into hosted-git-info. Unfortunately, hosted-git-info doesn't support enterprise URLs.
It's possible that the repo URL is on an enterprise Bitbucket too.
Does a --is-github flag to override this step sound sufficient?
I don’t want a new flag unless absolutely necessary. Seems you can fix it by improving these dependencies instead, so I’d rather see that. Also, improving those packages will benefit everyone, not just np.
That dependency is dead but I think it can be replaced by npm’s own resolver: https://www.npmjs.com/package/hosted-git-info