Open rarkins opened 6 years ago
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:
The warning is that maybe:
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.
checkbox approach may not cover this case.
GitHub's native automerge feature is a viable and someway better workaround for this
GitHub's native automerge feature is a viable and someway better workaround for this
Can you please give a link? I cannot find this feature by googling.
Google for "GitHub automerge"
Thanks, and excuse me for a bit of laziness. I was searching for “GitHub's native automerge feature”, and mostly only Dependabot-related articles came up.
Here is the link for future strangers: https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request
Wanted to jump in here and provide an additional use case for merge using comments. We use Poetry to manage our Python dependencies, which breaks the lock file each time one dependency is updated. This means that there is a lot of time one has to wait before merging in a subsequent dependency (i.e. wait for a rebase with the correct lock file). It would be really convenient to have a "rebase & merge" comment option.
Which platform/hosting mode are you using?
Which platform/hosting mode are you using?
We use the GitHub App.
Rebasing should happen automatically in the GitHub app without requiring manual intervention. Please create a separate discussion topic if you're not seeing that and can provide some logs or other evidence to help pinpoint it
Rebasing should happen automatically in the GitHub app without requiring manual intervention. Please create a separate discussion topic if you're not seeing that and can provide some logs or other evidence to help pinpoint it
Rebasing does happen automatically, it just takes a significant amount of time using Poetry (Between 10-15 minutes if manually triggered, 25-30 minutes if automatic). I can open another discussion topic, but I don't think this is a limitation in Renovate, but with Poetry itself. We had a similar problem on Dependabot, but having the rebase and merge problem made it easy to handle.
Poetry may be slow and that's not Renovate's fault, but the following should be false:
(Between 10-15 minutes if manually triggered, 25-30 minutes if automatic)
Automatic rebasing should happen as fast/faster than you can achieve with manual, because the merging of any Renovate PR should trigger a priority job in the queue.
I would have hoped that if you enable GitHub automerge in each PR and just leave them you should see them rebased until they are all merged (or failing tests).
Such "semi-auto" merge will be useful. In my case, I don't want to merge everything manually, but I want to review the changelog of the package being updated and changes in my source code before merging them.
Maybe it's possible to add an option that enables such "semi-auto" flow? For example, by adding a new checkbox to PRs? (like force rebase
checkbox)
If it's checked, Renovate will try to rebase/merge the PR automatically. If it's not - Renovate will wait for confirmation.
So automerge
option may be changed from a boolean flag to something like:
enabled
- current automerge=true
suggested
- disabled until the checkbox is checked, then enableddisabled
- current automerge=false
Or simply add automergeType=pr-with-confirmation
, which enables such behavior.
automergeType=checkbox
might make most sense
@rarkins said they want to do the linked issue first: ^quote
I'll mark this issue status:blocked
. After we've tried the checkbox-approach, we'll decide if we want to work on this issue. 😉
Related discussion:
How about prioritizing:
And closing these issues/discussions as won't do:
That way the bulk of users have a good way to speed up the "merge multiple Renovate PRs" workflow.
This is the problem we wanted to solve by making a new "merge using comments" feature:
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.
GitHub now has Merge Queue, [^footnote-merge-queue] where you can approve a PR, put it in the Queue, and let GitHub merge when the tests pass. GitHub will make sure the combination of PRs passes the tests. You can use GitHub Merge Queue with Renovate. [^footnote-renovate-docs]
I think, in general, we're going towards a checkbox-based system? See:
internalChecksFilter=strict
)If we want to keep this issue open, we still need to decide how to get Renovate to only accept merge comments from allowed users:
[^footnote-merge-queue]: GitHub Docs, managing a merge queue [^footnote-renovate-docs]: Renovate docs, GitHub Merge Queue
Scenario:
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:
Inspiration: https://github.com/uber-workflow/probot-app-merge-pr