Linux command
gh-pr-checks 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
View checks for the current branch's PR
gh pr checks
View checks for a specific PR
gh pr checks [pr-number]
Watch checks until they finish
gh pr checks --watch
Watch checks and exit on first failure
gh pr checks --watch --fail-fast
Show only required checks
gh pr checks --required
Output check results as JSON
gh pr checks --json [name,state,bucket]
Open check details in a web browser
gh pr checks --web
说明
gh pr checks displays the status of CI checks and status checks on a pull request. It shows each check's name, status (pending, passing, failing), and conclusion. The watch mode enables waiting for checks to complete, useful in scripts that need to proceed only after successful CI runs. The command integrates with GitHub Actions and third-party CI services. When using --json, the bucket field categorizes the state into pass, fail, pending, skipping, or cancel.
参数
- --watch
- Watch checks until they finish.
- -i, --interval _SECONDS_
- Refresh interval in seconds when watching (default 10).
- --fail-fast
- Exit watch mode on first check failure.
- --required
- Only show checks that are required.
- -w, --web
- Open the web browser to show details about checks.
- --json _fields_
- Output JSON with the specified fields. Available fields: bucket, completedAt, description, event, link, name, startedAt, state, workflow.
- -q, --jq _expression_
- Filter JSON output using a jq expression.
- -t, --template _string_
- Format JSON output using a Go template.
- -R, --repo _OWNER/REPO_
- Select another repository using the HOST/OWNER/REPO format.
FAQ
What is the gh-pr-checks command used for?
gh pr checks displays the status of CI checks and status checks on a pull request. It shows each check's name, status (pending, passing, failing), and conclusion. The watch mode enables waiting for checks to complete, useful in scripts that need to proceed only after successful CI runs. The command integrates with GitHub Actions and third-party CI services. When using --json, the bucket field categorizes the state into pass, fail, pending, skipping, or cancel.
How do I run a basic gh-pr-checks example?
Run `gh pr checks` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --watch do in gh-pr-checks?
Watch checks until they finish.