diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index f425d4266bd1d6f0898327d4612e61f1c39bb876..908a918dac35759260e0740ddec663b9e8bfd565 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -25,16 +25,6 @@ Also, be sure to check out Renovate's [shareable config presets](/config-presets If you have any questions about the below config options, or would like to get help/feedback about a config, please post it as an issue in [renovatebot/config-help](https://github.com/renovatebot/config-help) where we will do our best to answer your question. -## additionalBranchPrefix - -This value defaults to an empty string, and is typically not necessary. Some managers populate this field for historical reasons, for example we use `docker-` for Docker branches, so they may look like `renovate/docker-ubuntu-16.x`. You normally don't need to configure this, but one example where it can be useful is combining with `parentDir` in monorepos to split PRs based on where the package definition is located, e.g. - -```json -{ - "additionalBranchPrefix": "{{parentDir}}-" -} -``` - ## additionalReviewers In contrast to `reviewers`, this option adds to the existing reviewer list, rather than replacing it. This makes it suitable for augmenting a preset or base list without displacing the original, for example when adding focused reviewers for a specific package group. @@ -174,7 +164,7 @@ Note that this setting does not change the default _onboarding_ branch name, i.e ## branchTopic -This field is combined with `branchPrefix` and `additionalBranchPrefix` to form the full `branchName`. `branchName` uniqueness is important for dependency update grouping or non-grouping so be cautious about ever editing this field manually. This is an advance field and it's recommend you seek a config review before applying it. +This field is combined with `branchPrefix` and `managerBranchPrefix` to form the full `branchName`. `branchName` uniqueness is important for dependency update grouping or non-grouping so be cautious about ever editing this field manually. This is an advance field and it's recommend you seek a config review before applying it. ## bumpVersion @@ -744,6 +734,10 @@ To reduce "noise" in the repository, it defaults its schedule to `"before 5am on Add to this object if you wish to define rules that apply only to major updates. +## managerBranchPrefix + +This value defaults to an empty string, because historically no prefix was necessary for when Renovate was JS-only. Now - for example - we use `docker-` for Docker branches, so they may look like `renovate/docker-ubuntu-16.x`. You normally don't need to configure this. + ## minor Add to this object if you wish to define rules that apply only to minor updates. diff --git a/docs/usage/configuration-templates.md b/docs/usage/configuration-templates.md index 09068e4ff73fa695e675a27e0e00de8bea405f93..a320d101b5317ae07a53e219b41ff85871fa0e3c 100644 --- a/docs/usage/configuration-templates.md +++ b/docs/usage/configuration-templates.md @@ -11,13 +11,13 @@ This document describes how you can edit the branch names, commit messages, or P The branch name is very important for Renovate because it helps determine "grouping" of updates, and also makes it efficient when an existing PR needs to be updated with a newer version. Also, if you change branchPrefix and have some upgrades "ignored" (closed without merging) then you may see duplicate PRs opened with your new branch name. -`branchName` has a default value of `{{{branchPrefix}}}{{{additionalBranchPrefix}}}{{{branchTopic}}}`. +`branchName` has a default value of `{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}`. -The most common type of branch name you will see looks like this: `renovate/react-16.x`. In this example, the `branchPrefix` is the default `renovate/`, `additionalBranchPrefix` is empty, and `branchTopic` is `react-16.x`. +The most common type of branch name you will see looks like this: `renovate/react-16.x`. In this example, the `branchPrefix` is the default `renovate/`, `managerBranchPrefix` is empty, and `branchTopic` is `react-16.x`. Most people can leave `branchPrefix` as `renovate/` however if you prefer to have no forward slashes then you might pick `renovate-` instead. Please note that the onboarding PR is fixed to use `renovate/configure` however. -`additionalBranchPrefix` is optional and by default is empty for all JavaScript dependencies. We use `docker-` for all Docker updates, so you might see branches like `renovate/docker-ubuntu-16.x`. +`managerBranchPrefix` is optional and by default is empty for all JavaScript dependencies. We use `docker-` for all Docker updates, so you might see branches like `renovate/docker-ubuntu-16.x`. `branchTopic` depends on the package manager and upgrade type, so you will see a lot of variety. It is also the one you might be most likely to want to change, but be careful and consider posting your config to https://github.com/renovateapp/config-help first. diff --git a/lib/config/__snapshots__/migration.spec.ts.snap b/lib/config/__snapshots__/migration.spec.ts.snap index 3442949a7cb2644e6a6ed2eca81532a5de9a6ce0..1f7c3e633376d49b15c75a283e2c510960393e74 100644 --- a/lib/config/__snapshots__/migration.spec.ts.snap +++ b/lib/config/__snapshots__/migration.spec.ts.snap @@ -8,7 +8,6 @@ Object { exports[`config/migration migrateConfig(config, parentConfig) it migrates config 1`] = ` Object { - "additionalBranchPrefix": "foo", "autodiscover": true, "automerge": false, "automergeType": "branch", diff --git a/lib/config/definitions.ts b/lib/config/definitions.ts index c4985c62fc457eb194f018df0380f6f08d8c6498..3e7fd0858b9414ac6bd6b89b29afee526073d954 100644 --- a/lib/config/definitions.ts +++ b/lib/config/definitions.ts @@ -1218,12 +1218,12 @@ const options: RenovateOptions[] = [ name: 'branchName', description: 'Branch name template', type: 'string', - default: '{{{branchPrefix}}}{{{additionalBranchPrefix}}}{{{branchTopic}}}', + default: '{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}', cli: false, }, { - name: 'additionalBranchPrefix', - description: 'Additional string value to be appended to branchPrefix', + name: 'managerBranchPrefix', + description: 'Branch manager prefix', type: 'string', default: '', cli: false, diff --git a/lib/config/migration.spec.ts b/lib/config/migration.spec.ts index 86dae20755f835a24bdb2dcb174398be55a14187..0d2c8f55df64439811ddca52af147287a939e635 100644 --- a/lib/config/migration.spec.ts +++ b/lib/config/migration.spec.ts @@ -43,7 +43,6 @@ describe('config/migration', () => { upgradeInRange: true, automergeType: 'branch-push', baseBranch: 'next', - managerBranchPrefix: 'foo', renovateFork: true, ignoreNodeModules: true, node: { diff --git a/lib/config/migration.ts b/lib/config/migration.ts index f71bd3e36775e9f9dc319536a5d482d1bb6196cd..ee9be629734c3cc2df0014882d17c2b42f825954 100644 --- a/lib/config/migration.ts +++ b/lib/config/migration.ts @@ -190,10 +190,6 @@ export function migrateConfig( } else if (val === false) { migratedConfig.trustLevel = 'low'; } - } else if (key === 'managerBranchPrefix') { - isMigrated = true; - delete migratedConfig.managerBranchPrefix; - migratedConfig.additionalBranchPrefix = val; } else if (key === 'upgradeInRange') { isMigrated = true; delete migratedConfig.upgradeInRange; diff --git a/lib/config/validation.ts b/lib/config/validation.ts index c16210281da65eeab62b03a1261f418e2ecf17fc..12429e340dedf4b72fd7325386bd7511db17ba7a 100644 --- a/lib/config/validation.ts +++ b/lib/config/validation.ts @@ -32,7 +32,7 @@ export async function validateConfig( function getDeprecationMessage(option: string): string { const deprecatedOptions = { - branchName: `Direct editing of branchName is now deprecated. Please edit branchPrefix, additionalBranchPrefix, or branchTopic instead`, + branchName: `Direct editing of branchName is now deprecated. Please edit branchPrefix, managerBranchPrefix, or branchTopic instead`, commitMessage: `Direct editing of commitMessage is now deprecated. Please edit commitMessage's subcomponents instead.`, prTitle: `Direct editing of prTitle is now deprecated. Please edit commitMessage subcomponents instead as they will be passed through to prTitle.`, }; diff --git a/lib/datasource/docker/index.ts b/lib/datasource/docker/index.ts index 1bf5f5b0376ff04502116af3de5fff682d341ef2..a1ffbd65b147f584b6420119f6267bf449239e45 100644 --- a/lib/datasource/docker/index.ts +++ b/lib/datasource/docker/index.ts @@ -21,7 +21,7 @@ export const defaultRegistryUrls = ['https://index.docker.io']; export const registryStrategy = 'first'; export const defaultConfig = { - additionalBranchPrefix: 'docker-', + managerBranchPrefix: 'docker-', commitMessageTopic: '{{{depName}}} Docker tag', major: { enabled: false }, commitMessageExtra: diff --git a/lib/manager/buildkite/index.ts b/lib/manager/buildkite/index.ts index a97b1018ed28c4e6a93742ae3ded2deec5f17bb0..b11a9d6f821516b34d0407927628c39699398043 100644 --- a/lib/manager/buildkite/index.ts +++ b/lib/manager/buildkite/index.ts @@ -7,5 +7,5 @@ export const defaultConfig = { commitMessageTopic: 'buildkite plugin {{depName}}', commitMessageExtra: 'to {{#if isMajor}}v{{{newMajor}}}{{else}}{{{newValue}}}{{/if}}', - additionalBranchPrefix: 'buildkite-', + managerBranchPrefix: 'buildkite-', }; diff --git a/lib/manager/cargo/index.ts b/lib/manager/cargo/index.ts index 6f19e76b2cd8499a898db4e953c92b872b54ba7a..43e59812b4a0daf0919a246b2fca4c1806873cf2 100644 --- a/lib/manager/cargo/index.ts +++ b/lib/manager/cargo/index.ts @@ -11,7 +11,7 @@ export { extractPackageFile, updateArtifacts, language }; export const defaultConfig = { commitMessageTopic: 'Rust crate {{depName}}', - additionalBranchPrefix: 'rust-', + managerBranchPrefix: 'rust-', fileMatch: ['(^|/)Cargo.toml$'], versioning: cargoVersioning.id, rangeStrategy: 'bump', diff --git a/lib/manager/homebrew/index.ts b/lib/manager/homebrew/index.ts index 62bb3b08a55d92cd8b369f88cfa48f076d2b3cf2..9e04159829420fdb90712f55be5c391a3a904ce3 100644 --- a/lib/manager/homebrew/index.ts +++ b/lib/manager/homebrew/index.ts @@ -3,6 +3,6 @@ export { updateDependency } from './update'; export const defaultConfig = { commitMessageTopic: 'Homebrew Formula {{depName}}', - additionalBranchPrefix: 'homebrew-', + managerBranchPrefix: 'homebrew-', fileMatch: ['^Formula/[^/]+[.]rb$'], }; diff --git a/lib/util/template/index.ts b/lib/util/template/index.ts index 2160a8f2ca4d82cdc6e06a72f780c191d559b76b..502a8639976f033a5ac2c889608e9fdd59f35daf 100644 --- a/lib/util/template/index.ts +++ b/lib/util/template/index.ts @@ -23,7 +23,7 @@ export const exposedConfigOptions = [ 'group', 'groupSlug', 'groupName', - 'additionalBranchPrefix', + 'managerBranchPrefix', 'prBodyColumns', 'prBodyDefinitions', 'prBodyNotes', diff --git a/lib/workers/repository/updates/flatten.ts b/lib/workers/repository/updates/flatten.ts index d129fb87d5f70b80aab7a5eb731bfdf6bece8d08..603703329c261bf1eda576b15a8617a1b71ce1e0 100644 --- a/lib/workers/repository/updates/flatten.ts +++ b/lib/workers/repository/updates/flatten.ts @@ -101,7 +101,7 @@ export async function flattenUpdates( updateConfig.depName.match(/(^|\/)node$/) && updateConfig.depName !== 'calico/node' ) { - updateConfig.additionalBranchPrefix = ''; + updateConfig.managerBranchPrefix = ''; updateConfig.depNameSanitized = 'node'; } generateBranchName(updateConfig);