From 4c3f70d82ea0a21feef792b39aa9f10d1d866c3c Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:30:07 +0100 Subject: [PATCH] docs(configuration options): rewrite `keepUpdatedLabel` (#27703) Co-authored-by: Rhys Arkins <rhys@arkins.net> --- docs/usage/configuration-options.md | 12 ++++++++---- lib/config/options/index.ts | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 07e9112da8..88d3425b9a 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2125,12 +2125,16 @@ We recommend that you use the `strict` mode, and enable the `dependencyDashboard ## keepUpdatedLabel -On supported platforms it is possible to add a label to a PR to recreate/rebase it when the branch falls 1 or more commits behind its base branch. +On supported platforms you may add a label to a PR so that Renovate recreates/rebases the PR when the branch falls behind the base branch. Adding the `keepUpdatedLabel` label to a PR makes Renovate behave as if `rebaseWhen` were set to `behind-base-branch`, but only for the given PR. -The label is not removed from the PR after the rebase is complete, unlike what happens with `rebaseLabel`. +Renovate does _not_ remove the label from the PR after it finishes rebasing. +This is different from the `rebaseLabel` option, where Renovate _removes_ the label from the PR after rebasing. -This can be useful when you have approved certain PRs and want to keep them updated until they are ready to be merged. -The setting `keepUpdatedLabel` is best used in conjunction with `rebaseWhen` set to the values of `never` or `conflicted` that limit rebasing. +`keepUpdatedLabel` can be useful when you have approved certain PRs and want Renovate to keep the PRs up-to-date until you're ready to merge them. +The setting `keepUpdatedLabel` is best used in this scenario: + +- By default, you configure `rebaseWhen` to `never` or `conflicted` to reduce rebasing +- Sometimes, you want Renovate to keep specific PRs up-to-date with their base branch (equivalent to `rebaseWhen=behind-base-branch`) ## labels diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index 773a890fe6..466a74d50d 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -1766,7 +1766,7 @@ const options: RenovateOptions[] = [ { name: 'keepUpdatedLabel', description: - 'Label to request Renovate bot always rebase to keep branch updated.', + 'If set, users can add this label to PRs to request they be kept updated with the base branch.', type: 'string', supportedPlatforms: ['azure', 'gitea', 'github', 'gitlab'], }, -- GitLab