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/fetch-release-notes-migration.ts
2023-11-07 15:50:29 +00:00

25 lines
618 B
TypeScript

import is from '@sindresorhus/is';
import type { RenovateConfig } from '../../types';
import { RenamePropertyMigration } from '../base/rename-property-migration';
export class FetchReleaseNotesMigration extends RenamePropertyMigration {
constructor(originalConfig: RenovateConfig, migratedConfig: RenovateConfig) {
super(
'fetchReleaseNotes',
'fetchChangeLogs',
originalConfig,
migratedConfig,
);
}
override run(value: unknown): void {
let newValue: unknown = value;
if (is.boolean(value)) {
newValue = value ? 'pr' : 'off';
}
super.run(newValue);
}
}