GitHub CLI Repos and Pull Requests/Inspect mergeability via JSON

Inspect mergeability and review state programmatically.

Section: Reviews and Merge

Inspect mergeability via JSON

bash
bash
gh pr view 123 --json mergeStateStatus,isDraft,reviewDecision
Explanation

Inspect mergeability and review state programmatically.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Reviews and Merge
Approve a PR
Approve a pull request.
OpenIn sheetbashsame section
Comment on a PR
Leave a review comment.
OpenIn sheetbashsame section
Request changes on a PR
Request changes during review.
OpenIn sheetbashsame section
Merge a PR
Merge a pull request using a merge commit.
OpenIn sheetbashsame section
Squash merge a PR
Squash merge and delete the branch.
OpenIn sheetbashsame section
Rebase merge a PR
Merge a pull request using rebase.
OpenIn sheetbashsame section