0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/config/migrations/custom/require-config-migration.ts

14 lines
398 B
TypeScript

import { AbstractMigration } from '../base/abstract-migration';
export class RequireConfigMigration extends AbstractMigration {
override readonly propertyName = 'requireConfig';
override run(value: unknown): void {
if (value === false || value === 'false') {
this.rewrite('optional');
} else if (value === true || value === 'true') {
this.rewrite('required');
}
}
}