Skip to content

Commit

Permalink
refactor(migrations): master issue (#16399)
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed Jul 3, 2022
1 parent c866fd0 commit f82c867
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 1 addition & 8 deletions lib/config/migration.ts
Expand Up @@ -39,14 +39,7 @@ export function migrateConfig(config: RenovateConfig): MigratedConfig {
'peerDependencies',
];
for (const [key, val] of Object.entries(newConfig)) {
if (key.startsWith('masterIssue')) {
const newKey = key.replace('masterIssue', 'dependencyDashboard');
migratedConfig[newKey] = val;
if (optionTypes[newKey] === 'boolean' && val === 'true') {
migratedConfig[newKey] = true;
}
delete migratedConfig[key];
} else if (key === 'packageFiles' && is.array(val)) {
if (key === 'packageFiles' && is.array(val)) {
const fileList = [];
for (const packageFile of val) {
if (is.object(packageFile) && !is.array(packageFile)) {
Expand Down
7 changes: 7 additions & 0 deletions lib/config/migrations/migrations-service.ts
Expand Up @@ -75,6 +75,13 @@ export class MigrationsService {
['versionScheme', 'versioning'],
['lookupNameTemplate', 'packageNameTemplate'],
['aliases', 'registryAliases'],
['masterIssue', 'dependencyDashboard'],
['masterIssueApproval', 'dependencyDashboardApproval'],
['masterIssueAutoclose', 'dependencyDashboardAutoclose'],
['masterIssueHeader', 'dependencyDashboardHeader'],
['masterIssueFooter', 'dependencyDashboardFooter'],
['masterIssueTitle', 'dependencyDashboardTitle'],
['masterIssueLabels', 'dependencyDashboardLabels'],
]);

static readonly customMigrations: ReadonlyArray<MigrationConstructor> = [
Expand Down

0 comments on commit f82c867

Please sign in to comment.