mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
14 lines
467 B
TypeScript
14 lines
467 B
TypeScript
import is from '@sindresorhus/is';
|
|
import { AbstractMigration } from '../base/abstract-migration';
|
|
|
|
export class SuppressNotificationsMigration extends AbstractMigration {
|
|
override readonly propertyName = 'suppressNotifications';
|
|
|
|
override run(value: unknown): void {
|
|
if (is.nonEmptyArray(value) && value.includes('prEditNotification')) {
|
|
const newValue = value.filter((item) => item !== 'prEditNotification');
|
|
this.rewrite(newValue);
|
|
}
|
|
}
|
|
}
|