Search code examples
package.jsonrenovate

Renovate config "automerge" could not work


I use Renovate for update package.json

refs:

This is my renovate.json file, but patch directive is not work, I must merge it manually now. (schedule directive is work)

{
  "extends": ["config:base"],
  "timezone": "Asia/Tokyo",
  "schedule": ["every weekend"],
  "patch": { "automerge": true }
}

I should set like below?

{
  "automerge": true,
  "major": { "automerge": false },
  "minor": { "automerge": false }
}

Solution

  • You have to specify which types of updates you want to auto-merge. This is the example from the docs:

    {
      "packageRules": [
        {
          "updateTypes": ["minor", "patch", "pin", "digest"],
          "automerge": true
        }
      ]
    }
    

    Example from: https://docs.renovatebot.com/configuration-options/#automerge

    So your config should look like:

    {
      "extends": ["config:base"],
      "timezone": "Asia/Tokyo",
      "schedule": ["every weekend"],
      "packageRules": [
            {
              "updateTypes": ["patch", "pin", "digest"],
              "automerge": true
            }
          ]
    }