Appearance
0021: Merge each pull request into main only
Status: accepted
Date: 2026-12-06
PR: #51
Context
Pull request #49 sat on the branch of #46, but GitHub could not add it to the stack of #46, because the top of that stack was the closed #47. So #49 merged into the branch of #46 in place of main. The merge folded the product decision 0001 into #46, and the docs check of #46 failed, because main did not yet know where product records live. Undoing it took a force-push of the branch of #46.
Options considered
- No more stacked PRs: Stacked pull requests let the next decision start before the one below it merges.
- Red check only: A red check that is not required is easy to miss when a pull request is merged.
Decision
The Merges into main only check fails on each pull request whose base branch is not main. It passes once the pull request below merges and GitHub points the pull request at main. The PR gate blocks a new pull request on another branch when the pull request of that branch is not the top of its GitHub stack, or when no open pull request has that branch.
Consequences
The check is red, not required: GitHub still lets the human merge into another branch. The PR gate reads the stacks on GitHub, so it blocks a stacked pull request when it cannot reach GitHub.