We do a good job in this project making small PRs, which is great because they are easy to review. We also have really strict branch protection, requiring that tests pass in an up to date branch before merging. I think there are enough moving parts in this project that it's good that we do this; otherwise we'd have things broken often in master.
However, as a result, it takes a while to get branches merged after PR approval. There's updating the branch, waiting for tests to pass, and then merging. And worse, if another maintainer is doing this at the same time, the process has to be repeated.
I'd like to consider a couple solutions to reduce the effort needed:
- Encourage everyone to merge PRs upon approval.
Does that mean the merge responsibility will be placed on the approver?
Does that mean the merge responsibility will be placed on the approver?
Maybe more like the approver is encouraged to merge. I don't want to discourage people from ๐-ing things or create more burden.
Gotcha thanks! I'm ๐ on the proposed objectives (and automation in general!)
I've not worked with any of those bots before, but thinking through auto-merges.. I'd guess there may be some PRs where the submitter may want to get 2+ approvals vs the usual 1., and would _not_ want a bot to merge on the first approval.
Is that a conceivable scenario, and if so does anyone with experience with any of those bots/services know if scenarios like that are supported? Would also be curious if anyone can speak to pros/cons between those offerings as well
Yea, that makes sense to me. Whichever tool we choose, I'd think we'd want to have a human add the PR to the merge queue.
Ah okay, so basically the PR opener will have the ability to flag the PR as ready for the bot which lets them maintain some control, and the bots will only start on it once the approver has given the ๐ and our defined quality checks have been met.
It's crazy how many cool things bots can do these days!
I was thinking that after the review is done, someone, either the author or the reviewer, says, "okay bot, merge!" and then it enters the queue.
I like it!
Oh another thought, what about branch deletion post PR merges? I assume we all delete branches after merging a PR (at least I do for my PRs), but I'd hesitate before deleting a branch if I merged someone else's PR. I'm not sure _why_ that is though.
I suppose on the off chance the PR submitter wanted the branch kept around they could indicate so in the PR (for human or bot)?
On the subject of cool things bots can do: https://github.com/jessfraz/branch-cleanup-action :smile:
I had a look at enabling repo ranger for this project earlier, but I think I don't have enough permissions on the badges org to do it. I don't have badges listed in the "Account" drop-down on https://github.com/marketplace/ranger :(
I have the same result. But https://github.com/marketplace/ranger:
For personal accounts only
[...]
Contact us to beta test in org. accounts and private repos
So it's not a matter of permissions.
Yea, same issue here.
I was able to add the app through https://github.com/apps/repo-ranger, want to see if you can get anywhere with that?
Oh yeah. I think using the out-of-the-box config we should just be able to apply the "merge when passing" label to PRs once we've reviewed them and it will do that once the branch is up-to-date and all the tests have passed.

Lets give it a go next time dependabot has a pile of PRs for us..
Repo Ranger is working pretty well for us! Cool with closing this?
Most helpful comment
Repo Ranger is working pretty well for us! Cool with closing this?