Skip to content

pr-target-staging

A PR targets staging when the remote has that branch, else the default branch, unchanged. Detect, don’t assume: git ls-remote --heads origin staging; non-empty β†’ --base staging on gh pr create (a wrong base already open β†’ gh pr edit <n> --base staging). Exception: the deliberate staging β†’ main promotion PR targets the default branch on purpose.

Details: docs/pr-target-staging.md.