Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid parsing of some URLs with a custom port #1670

Closed
arcln opened this issue Oct 28, 2020 · 1 comment · Fixed by #1671
Closed

Invalid parsing of some URLs with a custom port #1670

arcln opened this issue Oct 28, 2020 · 1 comment · Fixed by #1671

Comments

@arcln
Copy link
Contributor

arcln commented Oct 28, 2020

Current behavior

The current regular expression that is used to parse repository URLs does not handle custom ports properly.

For example, given the URL git@localhost:2080/git/test.git, the regexp will ouput the following groups:

auth: git
host: localhost
path: 2080/git/test.git

If the URL works out of the box, this codepath will be skipped and it will still work.
However, given a case where the URL needs to be converted to HTTP(s) with basic auth information, it will create an invalid URL : https://git@localhost/2080/git/test.git.

Expected behavior

The port should be parsed correctly. This can be done easily by customising the regexp a little, like I did in #1671.

Environment

  • semantic-release version: 17.2.1, master
  • CI environment: not relevant
  • Plugins used: not relevant
  • semantic-release configuration: not relevant
  • CI logs: not relevant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants