Parse GitURL as assumed provider
See original GitHub issueRight now, we are unable to parse URL’s consistently as they are parsed based on the hostname which for on prem services wont follow the same standard in hostname.
We know what provider the URL comes from, so we should be able to force a particular type, and fallback to the current gitUrlParse implementation.
Feature Suggestion
- Either raise a PR to gitUrlParse to say, parse this as this type
- Or force the hostname in the URL that we parse to be of that default type
- Or pick apart that library and re-implement our own
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
IonicaBizau/git-url-parse
GitHub - IonicaBizau/git-url-parse: A high level git url parser for common git providers.
Read more >How to determine the URL that a local Git repository was ...
To obtain only the remote URL: git config --get remote.origin.url. If you require full output, and you are on a network that can...
Read more >URL Parsing - npm - Socket
An implementation of the WHATWG URL Standard's URL API and parsing machinery ... A high level git url parser for common git providers....
Read more >git-url-parse - npm Package Health Analysis
A high level git url parser for common git providers. Visit Snyk Advisor to see a full health score report for git-url-parse, including...
Read more >git-urls
Parse parses rawurl into a URL structure. Parse first attempts to find a standard URL with a valid Git transport as its scheme....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I wonder if it make sense to contribute a feature then to the upstream that we can pass in a parse method too for on prem hostnames too then? There’s a hacky workaround that we could force the URL hostname to the one that we know it could be, but i’d rather us try to standardize passing in the type instead.
Just mentioning it here that @n2ygk has already raised a PR to improve the library for Azure DevOps. https://github.com/IonicaBizau/git-url-parse/pull/124
If we can aggregate all the issues we are facing, I’m hopeful we can improve the upstream. 💯