Now that we have a more rapid pace of contributions we need some merge-related automation so that people don't have to babysit their pull requests to get them up-to-date with master, wait for CI to pass, and then merge them.
The solution I'd like to propose is a merge bot of some sort that minimally does the following:
... and optionally performs the following optimizations:
The closest open source solution I'm aware of for this is bors-ng, although it doesn't yet appear to support squash merging pull requests. I could also roll such a solution myself if necessary. If people are aware of any other solutions for doing this, just let me know.
If there are N pull requests in flight, create a staging branch containing all N changes and merge that if CI passes
This means N pull requests become one commit? I'm not too easy with that, it makes things like bisection much less effective. It also complicates authorship attribution.
@ocharles: No, if you batch N changes, they would be merged as N commits. What I mean is that each individual pull request would still be squashed to 1 commit each.
Ok, I thought that's what you were intending but I read this bit with "merge" as "squash merge" (as that's what "merge" has meant in this org so far).
create a staging branch containing all N changes and merge that if CI passes
Thanks, just wanted to clarify.
For a GitHub-based approach, there are quite a few actions and apps in the marketplace:
So it appears that Mergify is pretty close to satisfying the first requirement, so we'll go with that for now. The main thing it's missing is picking one pull request to drive to completion to avoid wasting CI resources by repeatedly merging master into candidate branches.
However, I think we should probably invest in speeding up CI first (such as https://github.com/dhall-lang/dhall-haskell/issues/1063) before devoting more resources to improving merge automation. In the worst case we can just let the merge bot run overnight, which is still an improvement over the current situation of people babysitting their pull requests for hours.
Closing, as Mergify seems to work quite well.
Most helpful comment
For a GitHub-based approach, there are quite a few actions and apps in the marketplace: