-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix URL parsing not working when passing only a domain to GitlabHostname #378
Conversation
fe3e6c1
to
d8c8eae
Compare
Codecov Report
@@ Coverage Diff @@
## master #378 +/- ##
==========================================
- Coverage 70.36% 70.31% -0.05%
==========================================
Files 62 62
Lines 3742 3743 +1
==========================================
- Hits 2633 2632 -1
- Misses 922 923 +1
- Partials 187 188 +1
Continue to review full report at Codecov.
|
@lkysow Sorry I seem to have been a little too eager in my PR. thanks for the pointer it is indeed way cleaner. I have amended my commit to take your changes into account. While rereading this method however I feel like we should really in the future try to use a URL for gitlab (and maybe github as well) this would unify the behavior between Gitlab,Bitbucket and Github and I think would make it easier for the end user. Right now a user can either specify https://custom.domain or custom.domain, but if they want to use http then they are forced to specify the scheme while the variable is named "GitlabHostname" which implies we shouldn't use a scheme. We could also simplify this part of the code by just always setting the GitLab API URL with the code instead of having an exception for "gitlab.com", since if the user puts "https://gitlab.com" it will run through the loop anyway. What do you think ? |
|
d8c8eae
to
2adaf4b
Compare
@lkysow amended my commit with your requested changes.
In any case these the first point can be rediscussed in the future if more people also find the current behavior a bit confusing. |
Thanks! |
Fixes #377
I also added a unit test to check for this particular case.