renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead
https://github.com/renovatebot/renovate/discussions
MIT License
27 stars 16 forks source link

disable automerge #1005

Closed rarkins closed 3 years ago

rarkins commented 3 years ago

Hi @rarkins, I'll ping you on this issue, but, if you prefer, I can create a new one. I have a similar problem, my renovate.json looks like this

{
    "extends": [
        "config:base",
        ":semanticCommitTypeAll(fix)"
    ],
    "prConcurrentLimit": 0,
    "prHourlyLimit": 0,
    "automerge": true,
    "major": {
        "automerge": false
    },
    "masterIssue": true,
    "masterIssueAutoclose": true,
    "packageRules": [
        {
            "packagePatterns": ["^org.jetbrains.kotlin"],
            "groupName": "Kotlin packages",
            "automerge": false
        }
    ]
}

the MR with all the kotlin packages grouped together works as expected, however, the automerge: false doesn't. Am I doing something wrong?

Originally posted by @gmariotti in https://github.com/renovatebot/config-help/issues/191#issuecomment-736338749

rarkins commented 3 years ago

That looks to me like it should work. Do you mean the Kotlin packages are grouped as expected but automerge is still enabled for that PR?

gmariotti commented 3 years ago

I mean that. With this configuration I would expect the MR to be blocked but, instead, renovate merges it. My setup is Gitlab self hosted, renovate version 23.89.3

rarkins commented 3 years ago

The almost identical config you mention works as expected here: https://github.com/rarkins/automerge-test-1/pull/1

Maybe you have some bot-side config you've forgotten about or something like that?

gmariotti commented 3 years ago

The bot config.js looks like this, is it possible that the packageRules is the problem? I didn't find any reference of it in the documentation for self-hosted.

module.exports = {
    // omited some sensitive fields
    platform: 'gitlab',
    logFileLevel: 'warn',
    logLevel: 'info',
    logFile: './renovate.log',
    onboarding: true,
    extends: ['config:base', ":semanticCommitTypeAll(fix)"],
    prHourlyLimit: 0,
    labels: [
        'renovate',
        'dependencies'
    ],
    trustLevel: 'high',
    npmrc: process.env.NPMRC_CONTENT,
    packageRules: [
      {
        "updateTypes": ["minor", "patch", "pin", "digest"],
        "automerge": true
      }
    ]
}
rarkins commented 3 years ago

Yes, that's the problem. Add updateTypes to your repository packageRules if you want them to have the same importance as the rule you have in your config.js.

gmariotti commented 3 years ago

What would happen if I just drop it from the config.js of the bot? Would renovate only use the configuration defined in each project?

rarkins commented 3 years ago

yes, that should fix your problem

gmariotti commented 3 years ago

Tried it now and I can confirm that it works successfully. Thank you so much @rarkins 🙇