Files
renovate/lib
Jamie Tanna c11b6146f6 fix(config/validation): allow patterns for allowedValues of patternMatch options (#47297)
As noted in [0], the stricter validation we now perform with
`allowedValues` has provided a little too-strict validation with
`matchUpdateTypes`, which is matched as a regex or glob.

If we don't treat them as a pattern, we see i.e.:

    Invalid packageRules[2].matchUpdateTypes: matchUpdateTypes had
    invalid values `["!major"]` which are not part of the allowedValues

For options with `patternMatch` set, we can instead treat a value as
valid if it can match any of the `allowedValues`, once any leading `!`
has been removed. This still catches typos such as `!majr`.

Currently `matchUpdateTypes` is the only option with both `allowedValues`
and `patternMatch`, but this will apply to any future options.

Co-authored-by: Claude Sonnet 5.5 <jamie.tanna+claude-code@mend.io>

[0]: https://github.com/renovatebot/renovate/pull/39076#issuecomment-6334467901
2026-10-22 08:49:24 +00:00
..