Files
renovate/lib/config/migrations/custom/semantic-prefix-migration.ts
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00

17 lines
564 B
TypeScript

import { isString } from '@sindresorhus/is';
import { AbstractMigration } from '../base/abstract-migration.ts';
export class SemanticPrefixMigration extends AbstractMigration {
override readonly deprecated = true;
override readonly propertyName = 'semanticPrefix';
override run(value: unknown): void {
if (isString(value)) {
const [text] = value.split(':');
const [type, scope] = text.split('(');
this.setSafely('semanticCommitType', type);
this.setSafely('semanticCommitScope', scope ? scope.split(')')[0] : null);
}
}
}