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

feat(config/validation): validate options which support regex/glob matching #28693

Merged
merged 14 commits into from
May 5, 2024
4 changes: 4 additions & 0 deletions lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const options: RenovateOptions[] = [
default: ['X-*'],
subType: 'string',
globalOnly: true,
patternMatch: true,
},
{
name: 'allowedEnv',
Expand All @@ -22,6 +23,7 @@ const options: RenovateOptions[] = [
default: [],
subType: 'string',
globalOnly: true,
patternMatch: true,
},
{
name: 'detectGlobalManagerConfig',
Expand Down Expand Up @@ -949,6 +951,7 @@ const options: RenovateOptions[] = [
default: null,
globalOnly: true,
supportedPlatforms: ['bitbucket'],
patternMatch: true,
},
{
name: 'autodiscoverTopics',
Expand Down Expand Up @@ -1230,6 +1233,7 @@ const options: RenovateOptions[] = [
mergeable: true,
cli: false,
env: false,
patternMatch: true,
},
{
name: 'excludeRepositories',
Expand Down
5 changes: 5 additions & 0 deletions lib/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@ export interface RenovateOptionBase {
* This is used to add depreciation message in the docs
*/
deprecationMsg?: string;

/**
* For internal use only: add it any option that supports regex or glob matching
RahulGautamSingh marked this conversation as resolved.
Show resolved Hide resolved
*/
patternMatch?: boolean;
}

export interface RenovateArrayOption<
Expand Down
1 change: 1 addition & 0 deletions tools/docs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function genTable(obj: [string, string][], type: string, def: any): string {
'experimentalIssues',
'advancedUse',
'deprecationMsg',
'patternMatch',
rarkins marked this conversation as resolved.
Show resolved Hide resolved
];
obj.forEach(([key, val]) => {
const el = [key, val];
Expand Down