mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
15 lines
443 B
TypeScript
15 lines
443 B
TypeScript
import is from '@sindresorhus/is';
|
|
import { AbstractMigration } from '../base/abstract-migration';
|
|
|
|
export class SemanticCommitsMigration extends AbstractMigration {
|
|
override readonly propertyName = 'semanticCommits';
|
|
|
|
override run(value: unknown): void {
|
|
if (is.boolean(value)) {
|
|
this.rewrite(value ? 'enabled' : 'disabled');
|
|
} else if (value !== 'enabled' && value !== 'disabled') {
|
|
this.rewrite('auto');
|
|
}
|
|
}
|
|
}
|