Skip to content

pr-target-staging

Default: a PR targets staging when the remote has a staging branch; otherwise the default branch, unchanged.

  1. Detect, don’t assume β€” git ls-remote --heads origin staging. Non-empty β†’ staging exists.
  2. Staging exists β†’ --base staging on gh pr create (which otherwise defaults to master/main). Wrong base already open β†’ gh pr edit <n> --base staging.
  3. No staging β†’ unchanged. Never alters a repo without staging.

Exception: the deliberate staging β†’ master/main promotion PR targets the default branch on purpose.

Details: docs/pr-target-staging.md. Related: rules/branch-discipline.md, rules/kit-pr-workflow-boundary.md, rules/git-ssh-remotes.md.