I have a number of repos that have CODEOWNERS set up so I get tagged in on any PR's and ideally I'd like to keep that while also allowing renovate to auto-merge PRs that have successful status checks.
At the moment all of the PR's that have been raised on https://github.com/gauntface/hopin-web-build-tools/pulls aren't getting merged once they've passed. My hunch is that it's due to the reviewer being added, but I'm not sure.
Is there anyway to have the setup described above?
Taking a look at your renovate.json it appears that you don't have assignees configured. Do I understand correctly that you're suggesting Renovate could use the CODEOWNERS logic to decide who to assign automatically?
FYI though, right now Renovate's behaviour is not to assign PRs if they are to be automerged. This was requested early on because people felt like it reduced the noise a little. So if you want assigning and automerging then that might also require a new option to force on.
The final topic is why Renovate isn't automerging when configured to do so? Without any PRs currently open it restricts my ability to guess, however from the merged ones it looks like the automerge setting was detected correctly:

Do you have an CI/tests enabled for that repo? It would be either that, or because you have set up some form of branch protection that blocks Renovate, such as required reviews, or approved committers to master, etc.
The next PR I get I'll add it to this comment.
I do have status checks but no branch protection is enabled.
I've added a CODEOWNERS file so that should a human open a PR I'm aware of it, I want renovate to ignore it (although it's useful if the status checks fail, in which case I'll eventually see it in my backlog of PRs).
I may be jumping the gun in assuming that is the reason automerge isn't working is because of CODEOWNERS.
Right now Renovate is oblivious to CODEOWNERS. I see that PRs are having you added as Reviewer though but that must be something automatic as Renovate is not doing that explicitly. I suppose there's a possibility that GitHub adds an automatic restriction that the codeowner must approve the PR before it is allowed to be merged.
One other possibility if the automerging used to work but recently stopped is that it's because of TravisCI's deprecation of commit statuses in favour of check runs.
As you suggest though, please alert me the next time there's a PR so that I can dig deeper.
Ok so here is an example PR that I would have thought could be auto-merged: https://github.com/gauntface/hopin-web-build-tools/pull/27
Looks like it did this time?
well I'll be damned. ok I take it all back :) sorry for the noise and thank you for all your help
Well I鈥檓 not convinced.. some of those old ones definitely look like they stayed open without automerging. Of course, please reopen or raise a new issue if it reoccurs.
I thought I had another one but it actually merged in the end - starting to think coveralls is just being slow / a bad actor in this case.
@gauntface that PR was actually just waiting for its next scheduled turn. FYI, we don't current run immediately on "green" because GitHub's webhooks do not give enough information to know for sure if a PR is ready for merge. i.e. it tells us that a status or check run completed, but not the combined status. So to run "immediately" would mean a lot of inefficient runs where:
Expect this to change once GitHub does, but for now it just means that automerging takes up to an hour or so depending on when the next scheduled run occurs.
That would explain a lot - thanks again for the info and fast response - do you sleep? ;)
:heart: to the renovate team.
I'm wondering if this CODEOWNERS app/renovate-approve still works as a correct approach. If I add renovate-approve to the CODEOWNERS list, GitHub does not add anyone as reviewer for a PR. Can you verify that this still works?
@rarkins
My issue sounds the same as @msimperi.
Without automerge, I had a CODEOWNERS file like:
* @adcellerant/app
Because I want automerge, I updated it like:
* @adcellerant/app
package.json @adcellerant/app app/renovate-approve
yarn.lock @adcellerant/app app/renovate-approve
Now, automerge is working 馃帀 , but @adcellerant/app isn't getting assigned on new PRs created by humans 馃槩. It's as if GitHub can't parse the file, but I doubt there's anywhere I could see logging of this.
Any tips? Is my syntax wrong?
see also: I recently had a discussion in https://github.com/renovatebot/config-help/issues/748.
Most helpful comment
@gauntface that PR was actually just waiting for its next scheduled turn. FYI, we don't current run immediately on "green" because GitHub's webhooks do not give enough information to know for sure if a PR is ready for merge. i.e. it tells us that a status or check run completed, but not the combined status. So to run "immediately" would mean a lot of inefficient runs where:
Expect this to change once GitHub does, but for now it just means that automerging takes up to an hour or so depending on when the next scheduled run occurs.