Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Renovate doesn't automerge after PR approved #819

Closed
kewah opened this issue Aug 21, 2020 · 3 comments
Closed

Renovate doesn't automerge after PR approved #819

kewah opened this issue Aug 21, 2020 · 3 comments

Comments

@kewah
Copy link

kewah commented Aug 21, 2020

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

What would you like to do?

I have a GitHub action that approves PRs from Renovate bot. (As mentioned in this issue we can no longer assign renovate-approve app to approve PRs.) Even if all the checks are green, the PR approved, and after an hour Renovate doesn't merge the PR. In the log the mergeStatus is still no automerge and "mergeStateStatus = BLOCKED"

DEBUG: Checking if we can automerge branch(branch="renovate/all-minor-patch")
DEBUG: mergeStatus=no automerge(branch="renovate/all-minor-patch")
DEBUG: Ensuring PR(branch="renovate/all-minor-patch")
DEBUG: There are 0 errors and 0 warnings(branch="renovate/all-minor-patch")

DEBUG: Checking #604 for automerge(branch="renovate/all-minor-patch")
{
  "automerge": true,
  "automergeType": "pr",
  "automergeComment": "automergeComment"
}
DEBUG: PR is configured for automerge(branch="renovate/all-minor-patch")
DEBUG: PR is not ready for merge(branch="renovate/all-minor-patch")
{
  "canMergeReason": "mergeStateStatus = BLOCKED"
}

I've tried the same Renovate config in a repo without branch protection and Renovate manages to auto merge the PRs.

{
  "extends": [
    "config:base",
    "group:allNonMajor",
    ":pinAllExceptPeerDependencies"
  ],
  "timezone": "Europe/Stockholm",
  "lockFileMaintenance": {
    "enabled": true
  },
  "automerge": true,
  "major": {
    "automerge": false
  },
  "postUpdateOptions": ["yarnDedupeFewer", "npmDedupe"],
}

The master branch protection setting
image

Is there something more I need to do? As a workaround I could try to implement a GitHub action that would do the merging

@rarkins
Copy link
Collaborator

rarkins commented Aug 21, 2020

  1. It's GitHub blocking it, not Renovate
  2. The account that approves must have write access, this could potentially be your problem
  3. https://github.com/apps/renovate-approve

@kewah
Copy link
Author

kewah commented Aug 21, 2020

Thanks for the quick answer 👍

Alright, I'll keep digging on the GitHub side :)

https://github.com/apps/renovate-approve

As mentioned in the issue description, it doesn't seem possible anymore to assign the renovate-approve bot as a codeowner If you need to add this bot to your CODEOWNERS, you can identify it using app/renovate-approve.

renovatebot/renovate-approve-bot#29

Unfortunately it's not possible to use a GitHub app in a codeowners file.

@kewah kewah closed this as completed Aug 21, 2020
@rarkins
Copy link
Collaborator

rarkins commented Aug 21, 2020

Sorry for missing what you wrote re: (3). FYI I've updated the approve bot's description now that it's confirmed it can't be assigned as a codeowner.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants