Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
GH-PR-LIST(1)			GitHub CLI manual		   GH-PR-LIST(1)

NAME
     gh-pr-list - List pull requests in a repository

SYNOPSIS
     gh pr list [flags]

DESCRIPTION
     List pull requests in a GitHub repository. By default, this only lists open
     PRs.

     The search query syntax is documented here:

     <https://docs.github.com/en/search-github/searching-on-github/searching-is-
     sues-and-pull-requests>

     On  supported GitHub hosts, advanced issue search syntax can be used in the
     --search query. For more information about advanced issue search, see:

     <https://docs.github.com/en/issues/tracking-your-work-with-issues/using-is-
     sues/filtering-and-searching-issues-and-pull-requests#building-ad-
     vanced-filters-for-issues>

OPTIONS
     --app <string>
	    Filter by GitHub App author

     -a, --assignee <string>
	    Filter by assignee

     -A, --author <string>
	    Filter by author

     -B, --base <string>
	    Filter by base branch

     -d, --draft
	    Filter by draft state

     -H, --head <string>
	    Filter by head branch (":" syntax not supported)

     -q, --jq <expression>
	    Filter JSON output using a jq expression

     --json <fields>
	    Output JSON with the specified fields

     -l, --label <strings>
	    Filter by label

     -L, --limit <int> (default 30)
	    Maximum number of items to fetch

     -S, --search <query>
	    Search pull requests with query

     -s, --state <string> (default "open")
	    Filter by state: {open|closed|merged|all}

     -t, --template <string>
	    Format JSON output using a Go template; see "gh help formatting"

     -w, --web
	    List pull requests in the web browser

OPTIONS INHERITED FROM PARENT COMMANDS
     -R, --repo <[HOST/]OWNER/REPO>
	    Select another repository using the [HOST/]OWNER/REPO format

ALIASES
     gh pr ls

JSON FIELDS
     additions, assignees, author,  autoMergeRequest,  baseRefName,  baseRefOid,
     body,  changedFiles,  closed,  closedAt, closingIssuesReferences, comments,
     commits, createdAt, deletions, files,  fullDatabaseId,  headRefName,  head-
     RefOid,  headRepository,  headRepositoryOwner,  id,  isCrossRepository, is-
     Draft, labels, latestReviews, maintainerCanModify, mergeCommit,  mergeStat-
     eStatus,	mergeable,   mergedAt,	 mergedBy,   milestone,  number,  poten-
     tialMergeCommit, projectCards,  projectItems,  reactionGroups,  reviewDeci-
     sion,  reviewRequests, reviews, state, statusCheckRollup, title, updatedAt,
     url

EXIT CODES
     0: Successful execution

     1: Error

     2: Command canceled

     4: Authentication required

     NOTE: Specific commands may have additional exit codes. Refer to  the  com-
     mand's help for more information.

EXAMPLE
     # List PRs authored by you
     $ gh pr list --author "@me"

     # List PRs with a specific head branch name
     $ gh pr list --head "typo"

     # 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 "<SHA>" --state merged

SEE ALSO
     gh-pr(1)

				    Aug 2026			   GH-PR-LIST(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gh-pr-list&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help