Renovate: Merge using comments

Created on 8 Jan 2018  路  9Comments  路  Source: renovatebot/renovate

Scenario:

  • Repository has 5 Renovate PRs
  • All 5 pass tests, and look OK to a reviewer
  • Reviewer wants to merge them all "right away", but:
  • To be safest, you should merge one, then rebase/retest the rest, then merge, then rebase/retest, etc

The result is that a reviewer/merger needs to keep checking back over a period of perhaps hours as they wait for tests to finish.

Solution:

  • users with write permissions can comment on each with "!merge"
  • Renovate will automatically merge them one by one, as it is able - allowing for rebases, retesting, etc

Inspiration: https://github.com/uber-workflow/probot-app-merge-pr

help wanted priority-4-low feature

Most helpful comment

Maybe.. we could also add a new config option to renovate's config that lets you define which users should merge if they review/approve the PR.

All 9 comments

To the Algolia team e.g. @samouss and @Haroenv, I often see you merging multiple PRs close together. Would this approach save you time? e.g. you manually review the PRs in a batch and add a comment "!merge" to each that is OK. Renovate will then merge them as fast as is possible allowing for any necessary conflict resolving, rebasing, retesting, etc.

I'd like it more if a review would do this, rather than !merge, is that possible?

It's possible today, although perhaps with some warning.

First of all, how that would work:

  • You would configure Renovate with automerge enabled, perhaps even for all PRs including major.
  • You would enable branch protection such that Reviews are required before merging. This will "block" automerge by default
  • If a Renovate PR is reviewed and other tests have passed, then GitHub will turn it green. This will allow Renovate to automerge it

The warning is that maybe:

  • The person reviewing it does not mean "merge this!". They maybe mean "looks ok to me" but assume someone else will look as well
  • Maybe the person reviewing should not be authorised to approve a merge

Those are good points, is there some way to check if reviewer can merge?

If you have restricted who can merge to master in the repo (e.g. in branch protection settings you have listed individuals or teams with merge rights) then unfortunately Renovate cannot merge. This is because of a GitHub bug/limitation where they don't offer any way to add an app (bot) to that list so all apps get blocked from merging if you enable that type of branch protection.

Otherwise, if you just mean users with write access to the repository vs read-only, then we can probably look that up. Please confirm if that's what you mean or if it's something else.

Maybe.. we could also add a new config option to renovate's config that lets you define which users should merge if they review/approve the PR.

I like the idea of using built-in functionality (reviewers) of the GitHub interface for this workflow.

(I use the merge when pipeline succeeds feature in GitLab quite often to help queue up merge requests when several come in at once)

Closed in favour of #3172

Reopening to add this comment by @azu in #3172:

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 same time.
It is hard that open each PRs and click merge button.
Instead of it, I can just reply @dependabot merge from email client.

image

checkbox approach may not cover this case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rarkins picture rarkins  路  40Comments

alexander-akait picture alexander-akait  路  38Comments

rtaum picture rtaum  路  36Comments

ikatyang picture ikatyang  路  34Comments

ThibaultVlacich picture ThibaultVlacich  路  34Comments