Attempt to support self-managed GitLab instances #390
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.
Checklist
and provided solution was discussedList of related issues or pull requests
Briefly describe the changes made in this pull request
An additional command line option has been introduced to supply a self-hosted GitLab instance. I think this is necessary since only URLs that contain
gitlab.comorgithub.comclearly identify a platform, self-hosted GitLab instances can have arbitrary names. Assertions have been adjusted to hopefully catch wrong command line options. Instead of usinggitlab.comas URL/hostname for any subsequent calls,self.instancewill be used instead.The supplied instance is then used as FQDN for
self.instance, if no instance is supplied, default togitlab.comfor the GitLab platform.Additional Notes
I agree with the technical obstacles stated in the issue, but my hope is there is only an advantage with this change. It should work better than not at all. I cannot judge if it will result in a bad user experience if errors do happen with instances that would not support the API calls made.
Tested with our local GitLab instance.
Instructions to review the pull request
Keep what you need from below, extend as necessary