Always strip url scheme from domain#676
Merged
codejedi365 merged 6 commits intoApr 13, 2024
Merged
Conversation
5db0f45 to
0ff815e
Compare
904b321 to
995cd5a
Compare
c63cea7 to
741f512
Compare
Due to a typo and conditional stripping of the url scheme the hvcs_domain and hvcs_api_domain values would contain protocol schemes when a user specified one but the defaults would not. It would cause the api_url and remote_url to end up as "https://https://domain.com"
741f512 to
1a01f58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi
Whilst fixing the tests for #675 I noticed something with
hvcs_api_domainandapi_url.hvcs_api_domainonly hashttps://stripped if read from the environment. As a resultapi_urlcan end up ashttps://https://...ifhvcs_api_domainis explicitly passed with the url scheme (which the tests do). I'm not sure if it's intentional given the test case, but it's surely not forapi_url😀Maybe this is better as an issue rather than PR, but in case it really is trivial here's a mod normalising
hvcs_api_domainacross github/gitea/gitlab by always strippinghttps://(andhvcs_domain, too).Thanks