.nh .TH "GH-PR-LIST" "1" "Oct 2024" "GitHub CLI 2.58.0" "GitHub CLI manual" .SH NAME gh-pr-list - List pull requests in a repository .SH SYNOPSIS \fBgh pr list [flags]\fR .SH DESCRIPTION List pull requests in a GitHub repository. .PP The search query syntax is documented here: \[la]https://docs.github.com/en/search\-github/searching\-on\-github/searching\-issues\-and\-pull\-requests\[ra] .SH OPTIONS .TP \fB--app\fR \fB\fR Filter by GitHub App author .TP \fB-a\fR, \fB--assignee\fR \fB\fR Filter by assignee .TP \fB-A\fR, \fB--author\fR \fB\fR Filter by author .TP \fB-B\fR, \fB--base\fR \fB\fR Filter by base branch .TP \fB-d\fR, \fB--draft\fR Filter by draft state .TP \fB-H\fR, \fB--head\fR \fB\fR Filter by head branch .TP \fB-q\fR, \fB--jq\fR \fB\fR Filter JSON output using a jq expression .TP \fB--json\fR \fB\fR Output JSON with the specified fields .TP \fB-l\fR, \fB--label\fR \fB\fR Filter by label .TP \fB-L\fR, \fB--limit\fR \fB (default 30)\fR Maximum number of items to fetch .TP \fB-S\fR, \fB--search\fR \fB\fR Search pull requests with query .TP \fB-s\fR, \fB--state\fR \fB (default "open")\fR Filter by state: {open|closed|merged|all} .TP \fB-t\fR, \fB--template\fR \fB\fR Format JSON output using a Go template; see "gh help formatting" .TP \fB-w\fR, \fB--web\fR List pull requests in the web browser .SH OPTIONS INHERITED FROM PARENT COMMANDS .TP \fB-R\fR, \fB--repo\fR \fB<[HOST/]OWNER/REPO>\fR Select another repository using the [HOST/]OWNER/REPO format .SH ALIASES gh pr ls .SH JSON FIELDS \fBadditions\fR, \fBassignees\fR, \fBauthor\fR, \fBautoMergeRequest\fR, \fBbaseRefName\fR, \fBbody\fR, \fBchangedFiles\fR, \fBclosed\fR, \fBclosedAt\fR, \fBcomments\fR, \fBcommits\fR, \fBcreatedAt\fR, \fBdeletions\fR, \fBfiles\fR, \fBfullDatabaseId\fR, \fBheadRefName\fR, \fBheadRefOid\fR, \fBheadRepository\fR, \fBheadRepositoryOwner\fR, \fBid\fR, \fBisCrossRepository\fR, \fBisDraft\fR, \fBlabels\fR, \fBlatestReviews\fR, \fBmaintainerCanModify\fR, \fBmergeCommit\fR, \fBmergeStateStatus\fR, \fBmergeable\fR, \fBmergedAt\fR, \fBmergedBy\fR, \fBmilestone\fR, \fBnumber\fR, \fBpotentialMergeCommit\fR, \fBprojectCards\fR, \fBprojectItems\fR, \fBreactionGroups\fR, \fBreviewDecision\fR, \fBreviewRequests\fR, \fBreviews\fR, \fBstate\fR, \fBstatusCheckRollup\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR .SH EXIT CODES 0: Successful execution .PP 1: Error .PP 2: Command canceled .PP 4: Authentication required .PP NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. .SH EXAMPLE .EX List PRs authored by you $ gh pr list --author "@me" List only PRs with all of the given labels $ gh pr list --label bug --label "priority 1" Filter PRs using search syntax $ gh pr list --search "status:success review:required" Find a PR that introduced a given commit $ gh pr list --search "" --state merged .EE .SH SEE ALSO \fBgh-pr(1)\fR