renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.29k stars 2.26k forks source link

Allow automerge for config migration #23317

Open rarkins opened 1 year ago

rarkins commented 1 year ago

Describe the proposed change(s).

Allow users to opt in to automerge of config migration PRs.

Describe why we need/want these change(s).

As requested by @hoepfnerj in #23302, they have a lot of repositories and would prefer to have Renovate automatically migrate itself.

HonkingGoose commented 1 year ago

I'm curious what direction you want to go with this feature. So here are some questions. 😄

New config option and environment variable?

Do you want a new config option like configMigrationAutomerge=true and matching variable --automergeConfigMigrationPRs?

New preset?

Or do you want a preset automergeConfigMigrationPRs, with a suitable prefix like helper or default or whatever.

The preset would do something like this:

{
  "packageRules": [
    {
      "matchUpdateTypes": ["configMigration"],
      "automerge": true
    }
  ]
}

No configMigration update type (yet)

I checked the matchUpdateTypes table: [^1]

Name Value
allowedValues  major, minor, patch, pin, pinDigest, digest, lockFileMaintenance, rollback, bump, replacement

And there's no configMigration update type yet.

[^1]: Renovate Docs, matchUpdateTypes.

rarkins commented 1 year ago

I think it would need to be a new option, or a change to an existing option. Maybe for example for config migration there's these options: