diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 4cad2a88e6d5da..1d7ff64cab0186 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2332,28 +2332,28 @@ If enabled Renovate will pin Docker images or GitHub Actions by means of their S ## platformAutomerge -!!! warning - Before you enable `platformAutomerge` you should enable your Git hosting platform's capabilities to enforce test passing before PR merge. +!!! note + If you use the default `platformAutomerge=true` then you should enable your Git hosting platform's capabilities to enforce test passing before PR merge. If you don't do this, the platform might merge Renovate PRs even if the repository's tests haven't started, are in still in progress, or possibly even when they have failed. On GitHub this is called "Require status checks before merging", which you can find in the "Branch protection rules" section of the settings for your repository. [GitHub docs, about protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches) [GitHub docs, require status checks before merging](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#require-status-checks-before-merging) If you're using another platform, search their documentation for a similar feature. -If you have enabled `automerge` and set `automergeType=pr` in the Renovate config, then you can also set `platformAutomerge` to `true` to speed up merging via the platform's native automerge functionality. +If you have enabled `automerge` and set `automergeType=pr` in the Renovate config, then leaving `platformAutomerge` as `true` speeds up merging via the platform's native automerge functionality. Renovate tries platform-native automerge only when it initially creates the PR. Any PR that is being updated will be automerged with the Renovate-based automerge. `platformAutomerge` will configure PRs to be merged after all (if any) branch policies have been met. -This option is available for Azure, GitHub and GitLab. +This option is available for Azure, Gitea, GitHub and GitLab. It falls back to Renovate-based automerge if the platform-native automerge is not available. You can also fine-tune the behavior by setting `packageRules` if you want to use it selectively (e.g. per-package). Note that the outcome of `rebaseWhen=auto` can differ when `platformAutomerge=true`. Normally when you set `rebaseWhen=auto` Renovate rebases any branch that's behind the base branch automatically, and some people rely on that. -This behavior is no longer guaranteed when you enable `platformAutomerge` because the platform might automerge a branch which is not up-to-date. +This behavior is no longer guaranteed when `platformAutomerge` is `true` because the platform might automerge a branch which is not up-to-date. For example, GitHub might automerge a Renovate branch even if it's behind the base branch at the time. Please check platform specific docs for version requirements. diff --git a/docs/usage/key-concepts/automerge.md b/docs/usage/key-concepts/automerge.md index 4df1b7f68c178b..20a20649dbdc9d 100644 --- a/docs/usage/key-concepts/automerge.md +++ b/docs/usage/key-concepts/automerge.md @@ -100,9 +100,8 @@ Say you want to automerge `patch` and `minor` updates for packages in the `group ### Faster merges with platform-native automerge -You can speed up merges by letting Renovate use your platform's native automerge. -The config option is called `platformAutomerge`. -If `automerge=true` and `automergeType=pr` then you can set `platformAutomerge=true`. +By default, Renovate uses platform-native automerge to speed up automerging. +If you don't want Renovate to use the platform-native automerge, then set `platformAutomerge` to `false`. For example: @@ -112,7 +111,7 @@ For example: "enabled": true, "automerge": true, "automergeType": "pr", - "platformAutomerge": true + "platformAutomerge": false } } ``` @@ -155,11 +154,10 @@ On `github.com`, go to your repository's "homepage", click on Settings, scroll d Then go to your repository's branch protection rules for your base branch (usually `main`) and enable the "Require merge queue" setting. Confirm you've set the correct "required checks" for your base branch. -Finally, allow Renovate to automerge by setting `automerge=true` and `platformAutomerge=true` in your Renovate config file, for example: +Finally, allow Renovate to automerge by setting `automerge=true` in your Renovate config file, for example: ```json { - "platformAutomerge": true, "packageRules": [ { "description": "Automerge non-major updates", @@ -180,7 +178,7 @@ On `github.com`, go to your repository's "homepage", click on Settings, scroll d Go to your repository's branch protection rules for your base branch (usually `main`) and enable the "Require merge queue" setting. Confirm you've set the correct "required checks" for your base branch. -Finally, allow Renovate to automerge by setting `automerge=true` and `platformAutomerge=true` in your Renovate config file (see earlier example). +Finally, allow Renovate to automerge by setting `automerge=true` in your Renovate config file (see earlier example). ## Automerging and scheduling diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index fab38d1aa84ff3..7ab12bb9114f16 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -2563,7 +2563,7 @@ const options: RenovateOptions[] = [ description: `Controls if platform-native auto-merge is used.`, type: 'boolean', supportedPlatforms: ['azure', 'gitea', 'github', 'gitlab'], - default: false, + default: true, }, { name: 'userStrings', diff --git a/lib/modules/platform/gitea/index.md b/lib/modules/platform/gitea/index.md index 098fb39be1f9fc..1f68d933542c5e 100644 --- a/lib/modules/platform/gitea/index.md +++ b/lib/modules/platform/gitea/index.md @@ -18,7 +18,7 @@ Either the account should have full name and email address set to allow Renovate ## Unsupported platform features/concepts - **Adding reviewers to PRs not supported**: Gitea versions older than `v1.14.0` do not have the required API. -- **Setting `platformAutomerge` to use platform-native automerge for PRs not supported**: Gitea versions older than v1.17.0 do not have the required API. +- **`platformAutomerge` (`true` by default) for platform-native automerge not supported**: Gitea versions older than v1.17.0 do not have the required API. - **Git upload filters**: If you're using a Gitea version older than `v1.16.0` then you must enable [clone filters](https://docs.gitea.io/en-us/clone-filters/). ## Features awaiting implementation