gh pr checks
Check the CI status of a pull request
What it does
gh pr checks lists a pull request's checks (tests, linter, build) with their status and a link to the log. With no number it takes the current branch's PR.
--watch keeps refreshing until every check is done, so you need not keep a GitHub tab open. The command exits with an error if a check failed, which makes it handy in scripts.
Syntax
gh pr checks <number>
gh pr checks <number> --watchExamples
Check whether the CI checks passed on pull request 42
gh pr checks 42pr checks— the status of CI checks42— the pull request number
Watch the checks of pull request 42 until they finish
gh pr checks 42 --watchpr checks 42— this PR's CI checks--watch— keep refreshing until all are done
Related commands
- gh run — Follow GitHub Actions runs and read their logs
- gh pr merge — Merge a pull request
- gh pr status — A summary: the current branch's PR, your PRs and review requests