Hacker News new | ask | show | jobs
by IshKebab 1075 days ago
You know when you submit a PR at the same time as someone else, they both pass CI, and then both merge without editing conflicts, but then it turns out there were semantic conflicts and you accidentally broke `master`?

This fixes that. It removes the race condition that exists because of the gap between testing a branch and merging it.

The solution is very simple - have a queue of PRs and automatically test & merge them one at a time.

There are some optimisations you can do to speed things up a bit, e.g. testing a bundle of PRs all at once, but that's the gist of it.

It is basically essential on any repo that has a high rate of PRs. I'm surprised so many people here haven't heard of it.

Gitlab has the same feature but they annoyingly called it something worse - merge trains, and it's only in Gitlab Premium.