gh-pr-checks
Show GitHub pull request checks
TLDR
Show checks for the pull request of the current branch
Show checks for a specific pull request
Watch checks and update in real time until completion
Show only required checks
SYNOPSIS
gh pr-checks [<PR_NUMBER> | <PR_URL>] [options]
PARAMETERS
<PR_NUMBER> | <PR_URL>
Specifies the pull request to inspect. If omitted, the command targets the pull request associated with the current Git branch.
-w, --watch
Continuously monitors and refreshes the display of check statuses as they change.
-i, --interval <duration>
Sets the refresh interval (e.g., "5s") when the --watch flag is active.
--repo <owner/repo>
Explicitly specifies the GitHub repository (e.g., "cli/cli") if not run within a Git repository context.
-a, --all
Displays all checks, including those that have successfully completed.
--required
Filters the output to show only checks that are marked as required for the pull request to be mergeable.
--fail-fast
Causes the command to exit immediately with a non-zero status code if any check is found to be in a failed state.
DESCRIPTION
The gh-pr-checks extension provides a concise way to view the status of all continuous integration (CI) and other automated checks associated with a GitHub pull request. It aggregates information from various status checks—such as builds, tests, linters, and deployment previews—presenting them in an easily digestible, often color-coded format directly within the terminal. This tool is invaluable for developers and reviewers who need to quickly verify that all automated checks have passed before merging a pull request, or for efficiently diagnosing the cause of a blocked PR. By providing crucial check status information on the command line, gh-pr-checks significantly streamlines the development workflow, minimizing the need to switch between the terminal and the web UI.
CAVEATS
Requires the GitHub CLI (gh) to be installed and authenticated.
Must be installed as a gh extension using `gh extension install vilmibm/gh-pr-checks`.
Operates exclusively with GitHub repositories.
Subject to GitHub API rate limits, which may affect frequent polling in watch mode.
INSTALLATION
To use gh-pr-checks, it must first be installed as a GitHub CLI extension:
`gh extension install vilmibm/gh-pr-checks`
INTERACTIVE WATCH MODE
When run with the -w or --watch flag, the command continuously updates the check statuses in real-time, providing a dynamic view of CI progress without manual refreshes.
HISTORY
The gh-pr-checks extension was developed by @vilmibm to fulfill a critical need for developers using the GitHub CLI: the ability to rapidly assess the status of CI/CD checks for pull requests without leaving the terminal environment. Its inception reflects a broader movement to integrate more of the GitHub workflow directly into the command line, thereby enhancing developer productivity by significantly reducing context switching. Upon its release, it quickly became a popular and essential tool for optimizing pull request review workflows among the GitHub CLI user base.


