diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 5f2bc37017576f..28db7ca5269556 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2181,6 +2181,17 @@ Defaults to `update`, but can also be set to `branch`. This sets the level the postUpgradeTask runs on, if set to `update` the postUpgradeTask will be executed for every dependency on the branch. If set to `branch` the postUpgradeTask is executed for the whole branch. +## prAllowMaintainerEdits + +Use `prAllowMaintainerEdits` to control if maintainers can edit Renovate's pull requests. + +When Renovate runs in a fork, this allows project maintainers to make manual changes to the +Renovate PR branch, without needing to create another new PR. + + +!!! note + This option is only relevant if you set `forkToken`. + ## prBodyColumns Use this array to provide a list of column names you wish to include in the PR tables. diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index 6a2aed7a40410b..39e27134fff0c2 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -1555,6 +1555,13 @@ const options: RenovateOptions[] = [ allowedValues: ['strict', 'flexible', 'none'], default: 'strict', }, + { + name: 'prAllowMaintainerEdits', + description: 'Decides if maintainers can edit Renovate pull requests.', + type: 'boolean', + supportedPlatforms: ['github'], + default: true, + }, { name: 'prCreation', description: 'When to create the PR for a branch.', diff --git a/lib/config/types.ts b/lib/config/types.ts index 5e67b80df5683b..3e68c82f481d57 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -230,6 +230,7 @@ export interface RenovateConfig postUpdateOptions?: string[]; prConcurrentLimit?: number; prHourlyLimit?: number; + prAllowMaintainerEdits?: boolean; defaultRegistryUrls?: string[]; registryUrls?: string[] | null; diff --git a/lib/modules/platform/types.ts b/lib/modules/platform/types.ts index 3dc626c3b09cb7..8bc5384768e0aa 100644 --- a/lib/modules/platform/types.ts +++ b/lib/modules/platform/types.ts @@ -103,6 +103,7 @@ export interface CreatePRConfig { labels?: string[] | null; platformOptions?: PlatformPrOptions; draftPR?: boolean; + allowMaintainerEdits?: boolean; } export interface UpdatePrConfig { number: number; diff --git a/lib/workers/repository/config-migration/pr/index.ts b/lib/workers/repository/config-migration/pr/index.ts index dca8cf475f0f89..f2ecedaa574ff4 100644 --- a/lib/workers/repository/config-migration/pr/index.ts +++ b/lib/workers/repository/config-migration/pr/index.ts @@ -100,6 +100,7 @@ ${ sourceBranch: branchName, // TODO #7154 targetBranch: config.defaultBranch!, + allowMaintainerEdits: config.prAllowMaintainerEdits, prTitle, prBody, labels, diff --git a/lib/workers/repository/onboarding/pr/index.ts b/lib/workers/repository/onboarding/pr/index.ts index e562fe95ea5cf6..28a22508bc954f 100644 --- a/lib/workers/repository/onboarding/pr/index.ts +++ b/lib/workers/repository/onboarding/pr/index.ts @@ -174,6 +174,7 @@ If you need any further assistance then you can also [request help here](${ const pr = await platform.createPr({ sourceBranch: config.onboardingBranch!, targetBranch: config.defaultBranch!, + allowMaintainerEdits: config.prAllowMaintainerEdits, prTitle: config.onboardingPrTitle!, prBody, labels, diff --git a/lib/workers/repository/update/pr/index.ts b/lib/workers/repository/update/pr/index.ts index 5091ef1abf259c..0ab2953466e965 100644 --- a/lib/workers/repository/update/pr/index.ts +++ b/lib/workers/repository/update/pr/index.ts @@ -353,6 +353,7 @@ export async function ensurePr( labels: prepareLabels(config), platformOptions: getPlatformPrOptions(config), draftPR: config.draftPR, + allowMaintainerEdits: config.prAllowMaintainerEdits, }); incLimitedValue('PullRequests');