Renovate: Checkbox to enable automerge per PR

Created on 4 Feb 2019  路  10Comments  路  Source: renovatebot/renovate

What would you like Renovate to be able to do?

Automerge specific PRs after status checks pass.

Describe the solution you'd like

A checkbox similar to the "check to rebase" feature except checking the box will enable automerge for this specific PR.

Describe alternatives you've considered

There is enabling automarege for everything but I usually want to avoid that for non-devDependencies. This could also be handled by GitHub if they were to implement automerge as a feature.

Additional context

1355 looks related.

Something like this:

screenshot from 2019-02-04 14-05-07

priority-3-normal

Most helpful comment

Would the automerge checkbox be reset if the branch is updated with a new version of a package?

Yes, it should be reset

All 10 comments

@abraham one challenge is that people with permission to edit a PR body (i.e. collaborators) may not have permissions to write to master. But this feature were opt-in - i.e. someone with master permission would need to enable it via config - then do you think that would suit you?

Interesting I hadn't thought of that. I mean the obvious solution is to parse the diffs of the issue text and make sure the author of the diff that change that checks the bos has write permissions. (I'm kidding).

1355 might just be the all around better solution. Even if a comment isn't as elegant as a checkbox.

Proposal:

  • [ ] Add a new automergeCheckbox option, which defaults to false
  • [ ] If automergeCheckbox is true, the add a check box below rebase which allows to automerge
  • [ ] If checked, automerge if the branch is green and unedited. Don't "undo" the check on a run, even if automerge is not possible

This way admins of a repo can still choose to enable this feature, and we don't have to worry about checking permissions.

Alternatively, here's how we could check permissions: https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level

But this only shows us that a user has write or admin permissions, not necessarily who can write to master. Maybe we could default to allowing only admins to check the box but have a config option to also allow all writers to automerge.

That would work for me.

Would the automerge checkbox be reset if the branch is updated with a new version of a package?

Would the automerge checkbox be reset if the branch is updated with a new version of a package?

Yes, it should be reset

Merge using comments #1355

It may be a different context, but #1355 is closed by this issue, and I comment here.

dependabot has this feature.
We can comment @dependabot merge and dependabot merge it.

Merge via comment is useful for me.
GitHub/GitLab supports commenting via email and I can merge the dependabot's PR from email client like gmail.

UseCase: renovatebot/dependabot create same Pull Request to multiple repositories at the same time.
It is hard that open each PRs and clicks the merge button.
Instead of it, I can just reply @dependabot merge from email client.

image

The checkbox approach may not cover this case.
However, renovatebot can define an auto-merge rule, and This may be an edge case.

@azu I have reopened #1355 with your comment

@rarkins Thanks for reopening.

FYI: GitHub has released auto-merge as a beta.
This feature sounds similar to this solution.

Was this page helpful?
0 / 5 - 0 ratings