question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parse GitURL as assumed provider

See original GitHub issue

Right 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
benjdlambertcommented, Jan 24, 2021

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.

1reaction
OrkoHuntercommented, Jan 24, 2021

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. 💯

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found