Scroll to navigation

GH-SEARCH-PRS(1) GitHub CLI manual GH-SEARCH-PRS(1)

NAME

gh-search-prs - Search for pull requests

SYNOPSIS

gh search prs [<query>] [flags]

DESCRIPTION

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:

⟨https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests⟩

OPTIONS

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

EXAMPLE

# 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

SEE ALSO

gh-search(1)

Mar 2024