GH-SEARCH-PRS(1)

πŸ’… GH-SEARCH-PRS(1) β€” search for pull requests, bestie

okay so this is the gh search prs page from the GitHub CLI manual (v2.102.0, dated Oct 2026, mark your calendars πŸ—“οΈ) β€” it's the one that lets you hunt down PRs without ever opening a browser tab. iconic behavior honestly.


✨ NAME ✨

gh-search-prs β€” Search for pull requests 🫢


🌸 SYNOPSIS 🌸

gh search prs [<query>] [flags]

that's it. that's the whole vibe. query optional, flags optional, slay mandatory πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Search for pull requests on GitHub. yes, literally that. no cap.

The command supports constructing queries using the GitHub search syntax, using the parameter and qualifier flags, or a combination of the two β€” so you can mix and match however your heart desires πŸ’–

GitHub search syntax is documented at:

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

On supported GitHub hosts, advanced issue search syntax can be used in the --search query. Advanced search syntax, like boolean operators OR/AND, and parentheses for nesting, must be passed as separate arguments, rather than within a quoted multi-word string. this part is so real β€” do not quote them, i'm begging πŸ™ˆ. This syntax is not supported with --web. For more information about advanced issue search, see:

⟨https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests#building-advanced-filters-for-issues⟩

For more information on handling search queries containing a hyphen, run gh search --help. (hyphens are little divas and need special handling, iykyk πŸ’€)


πŸŽ€ OPTIONS πŸŽ€

like forty of them. yes i counted. every single one is here, bestie, no skips πŸ‘‘

  • --app <string> β€” Filter by GitHub App author
  • --archived β€” Filter based on the repository archived state {true|false}
  • --assignee <string> β€” Filter by assignee
  • --author <string> β€” Filter by author (use --app to filter by a GitHub App)
  • -B, --base <string> β€” Filter on base branch name
  • --checks <string> β€” Filter based on status of the checks: {pending|success|failure}
  • --closed <date> β€” Filter on closed at date
  • --commenter <user> β€” Filter based on comments by user
  • --comments <number> β€” Filter on number of comments
  • --created <date> β€” Filter based on created at date
  • --draft β€” Filter based on draft state
  • -H, --head <string> β€” Filter on head branch name
  • --interactions <number> β€” Filter on number of reactions and comments
  • --involves <user> β€” Filter based on involvement of user
  • -q, --jq <expression> β€” Filter JSON output using a jq expression
  • --json <fields> β€” Output JSON with the specified fields
  • --label <strings> β€” Filter on label
  • --language <string> β€” Filter based on the coding language
  • -L, --limit <int> (default 30) β€” Maximum number of results to fetch
  • --locked β€” Filter on locked conversation status
  • --match <strings> β€” Restrict search to specific field of issue: {title|body|comments}
  • --mentions <user> β€” Filter based on user mentions
  • --merged β€” Filter based on merged state
  • --merged-at <date> β€” Filter on merged at date
  • --milestone <title> β€” Filter by milestone title
  • --no-assignee β€” Filter on missing assignee
  • --no-label β€” Filter on missing label
  • --no-milestone β€” Filter on missing milestone
  • --no-project β€” Filter on missing project
  • --order <string> (default "desc") β€” Order of results returned, ignored unless --sort flag is specified: {asc|desc}
  • --owner <strings> β€” Filter on repository owner
  • --project <owner/number> β€” Filter on project board owner/number
  • --reactions <number> β€” Filter on number of reactions
  • -R, --repo <OWNER/REPO> β€” Filter on repository, in OWNER/REPO format
  • --review <string> β€” Filter based on review status: {none|required|approved|changes_requested}
  • --review-requested <user> β€” Filter on user or team requested to review
  • --reviewed-by <user> β€” Filter on user who reviewed
  • --sort <string> (default "best-match") β€” Sort fetched results: {comments|reactions|reactions-+1|reactions--1|reactions-smile|reactions-thinking_face|reactions-heart|reactions-tada|interactions|created|updated}
  • --state <string> β€” Filter based on state: {open|closed}
  • --team-mentions <string> β€” Filter based on team mentions
  • -t, --template <string> β€” Format JSON output using a Go template; see "gh help formatting"
  • --updated <date> β€” Filter on last updated at date
  • --visibility <strings> β€” Filter based on repository visibility: {public|private|internal}
  • -w, --web β€” Open the search query in the web browser
heads up: --sort is doing all the work β€” --order just sits there looking pretty unless you've also specified --sort. and --web? advanced search syntax will not be joining the party there 🚫

🧚 JSON FIELDS 🧚

these are the exact fields you can ask for with --json, and yes they're case-sensitive so type them like this, periodt:

assignees, author, authorAssociation, body, closedAt, commentsCount,
createdAt, id, isDraft, isLocked, isPullRequest, labels, number,
repository, state, 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 command's help for more information.

πŸ”₯ EXAMPLE πŸ”₯

okay these are the fun part, live a little:

# 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 pull requests using raw search qualifiers as separate arguments
$ gh search prs is:merged author:monalisa

# 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

that -- in the -label:bug one? that's the whole trick, don't forget it 🫢


⭐ SEE ALSO ⭐

  • gh-search(1) β€” the parent, the icon, the main character πŸ‘‘

πŸ’œ bye bestie πŸ’œ

that's the page!! brought to you by GitHub CLI v2.102.0, dated Oct 2026, written by people who are definitely not me but whose manual page i have now thoroughly slayified πŸŽ€ go search some PRs, you've got this πŸ’…βœ¨

πŸ“¦ where this page comes from