-
Notifications
You must be signed in to change notification settings - Fork 503
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
🐛 Support self-hosted GitLab instances where base URL has a path component #3819
🐛 Support self-hosted GitLab instances where base URL has a path component #3819
Conversation
Self-hosted instances which dont use a subdomain result in broken API links. This change may not be finished, but is intended to evaluate the solution. Previously, self hosted instances where the instance is part of the path (foo.com/gitlab/owner/repo) would have their API base URL registered as foo.com/api/v4/ instead of foo.com/gitlab/api/v4/ Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
now that repoURL_parse handles GL_HOST, we dont need it elsewhere. Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3819 +/- ##
==========================================
- Coverage 75.54% 70.75% -4.80%
==========================================
Files 232 232
Lines 15772 15784 +12
==========================================
- Hits 11915 11168 -747
- Misses 3121 3930 +809
+ Partials 736 686 -50 |
@mwager mind testing this? And seeing if the README instructions are clear enough? |
Confirming that this works and scorecard successfully displays the results:
README instructions looking good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Signed-off-by: Spencer Schrock <sschrock@google.com>
if we can avoid an API call, do it. Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
the simpler the better Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
I've reverted one part to keep the PR smaller. if this causes it to fail for you, i will revert the reversion and merge the current state. |
Tested again on commit 693712c, everything fine :) |
What kind of change does this PR introduce?
bug fix
What is the current behavior?
Assumes the gitlab API base url doesn't have any part after the domain.
What is the new behavior (if this is a feature change)?**
Adds a new environment variable,
GL_HOST
to handle these situations.The env var is needed, otherwise there's ambiguity over what part of the URL is part of the API url, the repo owner, or project.
Which issue(s) this PR fixes
Fixes #3696
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)