`main` is busy, and PRs that passed CI break `main` after merging because of semantic conflicts.
AdvancedScenarioRemotes, Collaboration and Pull Requests
Answer
Situation read → Each PR was tested against an older main, not the real post-merge state.
What I'd do →
- Enable the GitHub merge queue on
main. It builds each PR on top of the queue ahead of it. - Add
merge_groupas a trigger to the CI workflow, otherwise the queue never gets results.
on:
pull_request:
merge_group:
- Set required status checks to those jobs; tune batch size and timeout.
- Fallback without a queue: "Require branches to be up to date before merging".
Why → The queue tests exactly what will land, in the order it will land.
Interview tip → "Up to date" requirement forces serial rebases; the merge queue scales better.
More on Remotes, Collaboration and Pull Requests
You are new to a team. How do you collaborate daily without stepping on others' toes?BeginnerYou are migrating a repo from Bitbucket to GitHub and must keep every branch and tag.IntermediateYou want to contribute a fix to an open-source project you do not have write access to.BeginnerA teammate sent a 3,000-line PR and nobody can review it properly.IntermediateA reviewer asks for changes. How do you update the PR cleanly?BeginnerYour team wants stacked PRs so that large work arrives in small reviewable steps. How do you set it up?Advanced