ghpr review wait
ghpr review wait - poll until a review is complete or timeout is reached
SYNOPSIS
Section titled “SYNOPSIS”ghpr review wait <pr> [options]DESCRIPTION
Section titled “DESCRIPTION”Continuously poll a pull request’s review status until a review is submitted or the timeout is reached. This is useful in CI/CD pipelines where you need to wait for human or Copilot review before proceeding.
The command stops polling when an approval, changes requested, or commented review is found.
ARGUMENTS
Section titled “ARGUMENTS”| Argument | Required | Description |
|---|---|---|
<pr> | Yes | Pull request number |
OPTIONS
Section titled “OPTIONS”| Option | Default | Description |
|---|---|---|
-t, --token <token> | - | GitHub personal access token |
-r, --repo <owner/repo> | - | Repository in owner/repo format |
--timeout <seconds> | 300 | Maximum wait time in seconds |
--interval <seconds> | 10 | Poll interval in seconds |
EXIT CODES
Section titled “EXIT CODES”| Code | Meaning |
|---|---|
0 | Review approved |
1 | Changes requested |
2 | Timeout reached |
3 | Error (API error, auth error) |
OUTPUT
Section titled “OUTPUT”Outputs the current check status after each poll interval, showing progress toward review completion.
EXAMPLES
Section titled “EXAMPLES”Basic Wait
Section titled “Basic Wait”ghpr review wait 123Wait up to 5 minutes (default), checking every 10 seconds.
Custom Timeout and Interval
Section titled “Custom Timeout and Interval”ghpr review wait 123 --timeout 600 --interval 30Wait up to 10 minutes, checking every 30 seconds.
CI/CD Pipeline Usage
Section titled “CI/CD Pipeline Usage”# Request Copilot review and wait for itghpr review request $PR_NUMBER copilotghpr review wait $PR_NUMBER --timeout 300 --interval 30
# Check exit codeif [ $? -eq 0 ]; then echo "PR approved!"elif [ $? -eq 1 ]; then echo "Changes requested" exit 1fiHandle Timeout
Section titled “Handle Timeout”ghpr review wait 123 --timeout 60 || { exit_code=$? if [ $exit_code -eq 2 ]; then echo "Timed out waiting for review" fi exit $exit_code}SEE ALSO
Section titled “SEE ALSO”- ghpr review request - Request a review
- ghpr review status - Check review status