Scroll to navigation



gh-search-prs - Search for pull requests


gh search prs [<query>] [flags]


Search for pull requests on GitHub.

The command supports constructing queries using the GitHub search syntax, using the parameter and qualifier flags, or a combination of the two.

GitHub search syntax is documented at:



Filter by GitHub App author

Filter based on the repository archived state {true|false}

Filter by assignee

Filter by author

Filter on base branch name

Filter based on status of the checks: {pending|success|failure}

Filter on closed at date

Filter based on comments by user

Filter on number of comments

Filter based on created at date

Filter based on draft state

Filter on head branch name

Filter on number of reactions and comments

Filter based on involvement of user

Filter JSON output using a jq expression

Output JSON with the specified fields

Filter on label

Filter based on the coding language

Maximum number of results to fetch

Filter on locked conversation status

Restrict search to specific field of issue: {title|body|comments}

Filter based on user mentions

Filter based on merged state

Filter on merged at date

Filter by milestone title

Filter on missing assignee

Filter on missing label

Filter on missing milestone

Filter on missing project

Order of results returned, ignored unless '--sort' flag is specified: {asc|desc}

Filter on repository owner

Filter on project board number

Filter on number of reactions

Filter on repository

Filter based on review status: {none|required|approved|changes_requested}

Filter on user or team requested to review

Filter on user who reviewed

Sort fetched results: {comments|reactions|reactions-+1|reactions--1|reactions-smile|reactions-thinking_face|reactions-heart|reactions-tada|interactions|created|updated}

Filter based on state: {open|closed}

Filter based on team mentions

Format JSON output using a Go template; see "gh help formatting"

Filter on last updated at date

Filter based on repository visibility: {public|private|internal}

Open the search query in the web browser


assignees, author, authorAssociation, body, closedAt, commentsCount, createdAt, id, isDraft, isLocked, isPullRequest, labels, number, repository, state, title, updatedAt, url


# search pull requests matching set of keywords "fix" and "bug"
$ gh search prs fix bug
# search draft pull requests in cli repository
$ gh search prs --repo=cli/cli --draft
# search open pull requests requesting your review
$ gh search prs --review-requested=@me --state=open
# search merged pull requests assigned to yourself
$ gh search prs --assignee=@me --merged
# search pull requests with numerous reactions
$ gh search prs --reactions=">100"
# search pull requests without label "bug"
$ gh search prs -- -label:bug
# search pull requests only from un-archived repositories (default is all repositories)
$ gh search prs --owner github --archived=false



Jul 2024 GitHub CLI v2.53.0