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

fix(gomod): explicitly match Gitlab ID for gitlab enterprise servers #17611

Merged
merged 2 commits into from Sep 4, 2022

Conversation

bastianccm
Copy link
Contributor

@bastianccm bastianccm commented Sep 4, 2022

Changes

This change checks for the correct hostType for a given URL to decide if it should try to match it as a Gitlab Enterprise repository for go modules hosted on URLs which do not include "gitlab".

This should fix #17570

Context

The HostRuleSearchResult does not return the hostType. The host-rules find method will match on hostnames only, if no matching hostType is set.

This means, that it is impossible to ask for a hostRule only if it matches the hostType.

To be non-breaking, we use this value to match that the hostRule is actually a Gitlab host rule in the gomod datasource, otherwise there is no way of telling a Github Enterprise and Gitlab Enterprise configuration apart.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/util/host-rules.ts Outdated Show resolved Hide resolved
@rarkins rarkins enabled auto-merge (squash) September 4, 2022 16:38
@rarkins rarkins merged commit 4ba04b4 into renovatebot:main Sep 4, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.190.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bastianccm bastianccm deleted the match-gitlab-hosttype branch September 5, 2022 05:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go package hosted in github enterprise no longer resolves
4 participants