mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix: Revert "feat(config): templated branchPrefix migration"
This reverts commit 7235c14df6
.
This commit is contained in:
parent
7235c14df6
commit
655bdc1dda
4 changed files with 1 additions and 14 deletions
|
@ -170,8 +170,6 @@ Warning: it's strongly recommended not to configure this field directly. Use at
|
|||
|
||||
You can modify this field if you want to change the prefix used. For example if you want branches to be like `deps/eslint-4.x` instead of `renovate/eslint-4.x` then you configure `branchPrefix` = `deps/`. Or if you wish to avoid forward slashes in branch names then you could use `renovate_` instead, for example.
|
||||
|
||||
`branchPrefix` must be configured at the root of the configuration (e.g. not within any package rule) and is not allowed to use template values. e.g. instead of `renovate/{{parentDir}}-`, configure the template part in `additionalBranchPrefix`, like `"additionalBranchPrefix": "{{parentDir}}-"`.
|
||||
|
||||
Note that this setting does not change the default _onboarding_ branch name, i.e. `renovate/configure`. If you wish to change that too, you need to also configure the field `onboardingBranch` in your admin bot config.
|
||||
|
||||
## branchTopic
|
||||
|
|
|
@ -8,14 +8,13 @@ Object {
|
|||
|
||||
exports[`config/migration migrateConfig(config, parentConfig) it migrates config 1`] = `
|
||||
Object {
|
||||
"additionalBranchPrefix": "{{parentDir}}-",
|
||||
"additionalBranchPrefix": "foo",
|
||||
"autodiscover": true,
|
||||
"automerge": false,
|
||||
"automergeType": "branch",
|
||||
"baseBranches": Array [
|
||||
"next",
|
||||
],
|
||||
"branchPrefix": "renovate/",
|
||||
"commitMessage": "{{#if semanticCommitType}}{{semanticCommitType}}{{#if semanticCommitScope}}({{semanticCommitScope}}){{/if}}: {{/if}}some commit message",
|
||||
"commitMessageExtra": "{{currentValue}} something",
|
||||
"dependencyDashboard": true,
|
||||
|
|
|
@ -44,7 +44,6 @@ describe('config/migration', () => {
|
|||
automergeType: 'branch-push',
|
||||
baseBranch: 'next',
|
||||
managerBranchPrefix: 'foo',
|
||||
branchPrefix: 'renovate/{{parentDir}}-',
|
||||
renovateFork: true,
|
||||
ignoreNodeModules: true,
|
||||
node: {
|
||||
|
|
|
@ -194,15 +194,6 @@ export function migrateConfig(
|
|||
isMigrated = true;
|
||||
delete migratedConfig.managerBranchPrefix;
|
||||
migratedConfig.additionalBranchPrefix = val;
|
||||
} else if (
|
||||
key === 'branchPrefix' &&
|
||||
is.string(val) &&
|
||||
val.includes('{{')
|
||||
) {
|
||||
isMigrated = true;
|
||||
const templateIndex = val.indexOf(`{{`);
|
||||
migratedConfig.branchPrefix = val.substring(0, templateIndex);
|
||||
migratedConfig.additionalBranchPrefix = val.substring(templateIndex);
|
||||
} else if (key === 'upgradeInRange') {
|
||||
isMigrated = true;
|
||||
delete migratedConfig.upgradeInRange;
|
||||
|
|
Loading…
Reference in a new issue