Config-help: automerge aborted - PR exists.

Created on 22 Apr 2020  路  6Comments  路  Source: renovatebot/config-help

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

Renovate logs

DEBUG: Checking if we can automerge branch(branch="renovate/node-13.x")
DEBUG: getBranchPr(renovate/node-13.x)(branch="renovate/node-13.x")
DEBUG: findPr(renovate/node-13.x, undefined, open)(branch="renovate/node-13.x")
DEBUG: Found PR #444(branch="renovate/node-13.x")
DEBUG: Returning from graphql open PR list(branch="renovate/node-13.x")
DEBUG: mergeStatus=automerge aborted - PR exists(branch="renovate/node-13.x")
DEBUG: Branch automerge not possible(branch="renovate/node-13.x")
{
  "mergeStatus": "automerge aborted - PR exists"
}
DEBUG: Ensuring PR(branch="renovate/node-13.x")
DEBUG: There are 0 errors and 0 warnings(branch="renovate/node-13.x")
DEBUG: getBranchPr(renovate/node-13.x)(branch="renovate/node-13.x")
DEBUG: findPr(renovate/node-13.x, undefined, open)(branch="renovate/node-13.x")
DEBUG: Found PR #444(branch="renovate/node-13.x")
DEBUG: Returning from graphql open PR list(branch="renovate/node-13.x")
DEBUG: Found existing PR(branch="renovate/node-13.x")
DEBUG: getBranchStatus(renovate/node-13.x)(branch="renovate/node-13.x")
DEBUG: branch status check result(branch="renovate/node-13.x")
{
  "state": "success",
  "statuses": [
    {
      "url": "https://api.github.com/repos/bixlabs/slashdash/statuses/8dc08596f2070dda7fe09e6b48d7431dfce5d764",
      "avatar_url": "https://avatars2.githubusercontent.com/oa/4808?v=4",
      "id": 9439979067,
      "node_id": "MDEzOlN0YXR1c0NvbnRleHQ5NDM5OTc5MDY3",
      "state": "success",
      "description": "Your tests passed on CircleCI!",
      "target_url": "https://circleci.com/gh/bixlabs/slashdash/1196?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link",
      "context": "ci/circleci: build",
      "created_at": "2020-04-22T02:49:30Z",
      "updated_at": "2020-04-22T02:49:30Z"
    }
  ]
}
DEBUG: check runs result(branch="renovate/node-13.x")
{
  "checkRuns": [
    {
      "name": "SonarCloud Code Analysis",
      "status": "completed",
      "conclusion": "success"
    }
  ]
}
DEBUG: Processing existing PR(branch="renovate/node-13.x")
DEBUG: getBranchStatus(renovate/node-13.x)(branch="renovate/node-13.x")
DEBUG: branch status check result(branch="renovate/node-13.x")
{
  "state": "success",
  "statuses": [
    {
      "url": "https://api.github.com/repos/bixlabs/slashdash/statuses/8dc08596f2070dda7fe09e6b48d7431dfce5d764",
      "avatar_url": "https://avatars2.githubusercontent.com/oa/4808?v=4",
      "id": 9439979067,
      "node_id": "MDEzOlN0YXR1c0NvbnRleHQ5NDM5OTc5MDY3",
      "state": "success",
      "description": "Your tests passed on CircleCI!",
      "target_url": "https://circleci.com/gh/bixlabs/slashdash/1196?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link",
      "context": "ci/circleci: build",
      "created_at": "2020-04-22T02:49:30Z",
      "updated_at": "2020-04-22T02:49:30Z"
    }
  ]
}
DEBUG: check runs result(branch="renovate/node-13.x")
{
  "checkRuns": [
    {
      "name": "SonarCloud Code Analysis",
      "status": "completed",
      "conclusion": "success"
    }
  ]
}
DEBUG: getBranchStatus() result(branch="renovate/node-13.x")
{
  "branchStatus": "green",
  "branchName": "renovate/node-13.x"
}
DEBUG: Pull Request #444 does not need updating(branch="renovate/node-13.x")
DEBUG: Checking #444 for automerge(branch="renovate/node-13.x")
{
  "automerge": true,
  "automergeType": "branch",
  "automergeComment": "automergeComment"
}
DEBUG: PR is configured for automerge(branch="renovate/node-13.x")
DEBUG: PR is not ready for merge(branch="renovate/node-13.x")
{
  "canMergeReason": "mergeStateStatus = BLOCKED"
}

What would you like to do?

I want PRs not being created and automatically merged branches for minor and patch versions. What am I doing wrong?

renovate.json

{
  "minor": {
    "automerge": true
  },
  "patch": {
    "automerge": true
  },
  "pin": {
    "automerge": true
  },
  "automergeType": "branch"
}

PR on Github
Screenshot from 2020-04-22 13-47-22

All 6 comments

There's two things here it seems:

  1. Why did it create a PR?
  2. Why isn't the PR merged?

For (1), you need to look at the logs for the time when the PR was created. PRs will be created if branch automerging is not possible - either due to failed tests or due to a configuration on GitHub (e.g. mandatory PR reviews) that make it impossible. It could be the same reason that is still blocking the PR being merged now. If you have enabled branch protection of master, that's the most likely reason.

@rarkins thank you for your answer.

Screenshot from 2020-04-23 14-10-36

You were right, I think renovate is creating the PR because of the attached image :arrow_up:.
I wonder why the PR is not being merged, the PR is approved by renovate-approve and all the checks are passing.

I'll disable that option, and see what happens.

It should hopefully work. Perhaps do as you suggest first and see. Do you have any tests?

BTW if you have "Require PR reviews" enabled then that's incompatible with Renovate's branch automerging. So if you do keep it, you should switch your automerge back to the default PR automerge.

Finally it didn't work because only admins can push/merge to protected branches, I've agregated the renovate bot to the list of users that could also merge, I think this will solve it.

Screenshot from 2020-04-23 15-28-41

I think we could close this issue, because it was something from my side, anyway I wish this could help other devs with similar configuration than mine.

Thank you @rarkins!

Finally it did work, thank you for your help :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jenniesyip picture jenniesyip  路  3Comments

sjparkinson picture sjparkinson  路  5Comments

diagonalfish picture diagonalfish  路  3Comments

augi picture augi  路  5Comments

stefee picture stefee  路  4Comments