renovate: Fix go-github exclusion rule #40911
Merged
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.
This week's renovate update (#40897) tried and failed to upgrade
google/go-github
because of how this module's major version is included in the module import path.Automated major upgrades for this module were supposed to be disabled by #40326, but that PR did not actually work as expected as it configured
github.com/google/go-github
inmatchPackageNames
which only does an exact module name match and does not match the actual module name which includes the module major version.This PR fixes the logic by configuring this
matchPackageNames
with a glob pattern.Relevant renovate documentations on exact string matches, glob patterns and regex in
matchPackageNames
: https://docs.renovatebot.com/string-pattern-matching/Note: for a followup, instead of disabling major upgrades for this module, we could consider instead configuring renovate with a
postUpgradeTasks
tosed
the module import string to use the new major version.Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.