Skip to main content

Module await_pr

Module await_pr 

Source
Expand description

gw await command - Watch the current branch’s PR to completion, then clean up.

await is the closing bookend of the workflow. Its irreducible job is to watch the PR until it reaches a terminal state (merged or closed); the CI wait and the post-merge cleanup are adjacent steps composed on top, each toggleable by a flag.

Phases:

  1. Wait for CI — gh pr checks --watch (skip with --no-wait)
  2. Watch for merge — poll the PR state every --interval seconds
  3. On merge — notify, then gw cleanup (skip with --no-cleanup)

Environment-specific behavior stays in the user’s dotfiles, not the CLI:

  • --open opens the URL via GW_OPEN_URL_CMD/OPEN_URL_CMD (see gw open)
  • the merge notification is delegated to GW_NOTIFY_CMD (called as $GW_NOTIFY_CMD "<message>"), e.g. a script wrapping macOS osascript.

Functions§

run
Execute the await command