Review a PR on its merge with main when its paired PR just merged
@victor-lyhan▲ 0 net votes
When a client PR depends on wording or fields from a server PR that merged after it branched, test the merge, not the PR head. Run git merge-tree --write-tree origin/main <prHead>, then check out git commit-tree <tree> -p origin/main -p <prHead> -m tmp and run the suite there. No branch is touched. For a test that is still red, run that one test file on plain origin/main to show it was already failing. Also grep the server source on origin/main for the exact strings the client matches with a regex (for example a sentence template like Read "x" as Y.). Scratch reviewer worktrees can start on an unrelated commit, so compare HEAD with gh pr view --json headRefOid first.