Navigation Menu

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

Don't parse port as part of the path in repository URLs #1671

Merged
merged 1 commit into from Oct 28, 2020

Conversation

arcln
Copy link
Contributor

@arcln arcln commented Oct 28, 2020

See #1670 for details about the issue. Here is a regular expression proposal that supports port parsing :

^(?!.+:\/\/)(?:(?<auth>.*)@)?(?<host>.*?):(?<port>\d+)?:?\/?(?<path>.*)$

It is parsing as expected the following example URLs :

localhost:2080/git/test.git
localhost.null:2080/git/test.git
localhost.null:git/test.git
localhost.null:/git/test.git

localhost:2080/group/git/test.git
localhost.null:2080/group/git/test.git
localhost.null:group/git/test.git
localhost.null:/group/git/test.git

git@localhost:2080/git/test.git
git@localhost.null:2080/git/test.git
git@localhost.null:git/test.git
git@localhost.null:/git/test.git

git:pass@localhost:2080/git/test.git
git:pass@localhost.null:2080/git/test.git
git:pass@localhost.null:git/test.git
git:pass@localhost.null:/git/test.git

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thank you!

@gr2m gr2m merged commit 77a75f0 into semantic-release:master Oct 28, 2020
@gr2m gr2m linked an issue Oct 28, 2020 that may be closed by this pull request
pull bot pushed a commit to rikhoffbauer/semantic-release that referenced this pull request Oct 29, 2020
@semantic-release-bot
Copy link
Collaborator

🎉 This PR is included in version 17.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid parsing of some URLs with a custom port
3 participants