.nh .TH "GH-SEARCH-PRS" "1" "May 2024" "" "GitHub CLI manual" .SH NAME .PP gh-search-prs - Search for pull requests .SH SYNOPSIS .PP \fBgh search prs [] [flags]\fR .SH DESCRIPTION .PP Search for pull requests on GitHub. .PP The command supports constructing queries using the GitHub search syntax, using the parameter and qualifier flags, or a combination of the two. .PP GitHub search syntax is documented at: \[la]https://docs.github.com/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--archived\fR Filter based on the repository archived state {true|false} .TP \fB--assignee\fR \fB\fR Filter by assignee .TP \fB--author\fR \fB\fR Filter by author .TP \fB-B\fR, \fB--base\fR \fB\fR Filter on base branch name .TP \fB--checks\fR \fB\fR Filter based on status of the checks: {pending|success|failure} .TP \fB--closed\fR \fB\fR Filter on closed at date .TP \fB--commenter\fR \fB\fR Filter based on comments by user .TP \fB--comments\fR \fB\fR Filter on number of comments .TP \fB--created\fR \fB\fR Filter based on created at date .TP \fB--draft\fR Filter based on draft state .TP \fB-H\fR, \fB--head\fR \fB\fR Filter on head branch name .TP \fB--interactions\fR \fB\fR Filter on number of reactions and comments .TP \fB--involves\fR \fB\fR Filter based on involvement of user .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--label\fR \fB\fR Filter on label .TP \fB--language\fR \fB\fR Filter based on the coding language .TP \fB-L\fR, \fB--limit\fR \fB (default 30)\fR Maximum number of results to fetch .TP \fB--locked\fR Filter on locked conversation status .TP \fB--match\fR \fB\fR Restrict search to specific field of issue: {title|body|comments} .TP \fB--mentions\fR \fB\fR Filter based on user mentions .TP \fB--merged\fR Filter based on merged state .TP \fB--merged-at\fR \fB\fR Filter on merged at date .TP \fB--milestone\fR \fB\fR Filter by milestone title .TP \fB--no-assignee\fR Filter on missing assignee .TP \fB--no-label\fR Filter on missing label .TP \fB--no-milestone\fR Filter on missing milestone .TP \fB--no-project\fR Filter on missing project .TP \fB--order\fR \fB<string> (default "desc")\fR Order of results returned, ignored unless '--sort' flag is specified: {asc|desc} .TP \fB--owner\fR \fB<strings>\fR Filter on repository owner .TP \fB--project\fR \fB<number>\fR Filter on project board number .TP \fB--reactions\fR \fB<number>\fR Filter on number of reactions .TP \fB-R\fR, \fB--repo\fR \fB<strings>\fR Filter on repository .TP \fB--review\fR \fB<string>\fR Filter based on review status: {none|required|approved|changes_requested} .TP \fB--review-requested\fR \fB<user>\fR Filter on user or team requested to review .TP \fB--reviewed-by\fR \fB<user>\fR Filter on user who reviewed .TP \fB--sort\fR \fB<string> (default "best-match")\fR Sort fetched results: {comments|reactions|reactions-+1|reactions--1|reactions-smile|reactions-thinking_face|reactions-heart|reactions-tada|interactions|created|updated} .TP \fB--state\fR \fB<string>\fR Filter based on state: {open|closed} .TP \fB--team-mentions\fR \fB<string>\fR Filter based on team mentions .TP \fB-t\fR, \fB--template\fR \fB<string>\fR Format JSON output using a Go template; see "gh help formatting" .TP \fB--updated\fR \fB<date>\fR Filter on last updated at date .TP \fB--visibility\fR \fB<strings>\fR Filter based on repository visibility: {public|private|internal} .TP \fB-w\fR, \fB--web\fR Open the search query in the web browser .SH JSON FIELDS .PP \fBassignees\fR, \fBauthor\fR, \fBauthorAssociation\fR, \fBbody\fR, \fBclosedAt\fR, \fBcommentsCount\fR, \fBcreatedAt\fR, \fBid\fR, \fBisDraft\fR, \fBisLocked\fR, \fBisPullRequest\fR, \fBlabels\fR, \fBnumber\fR, \fBrepository\fR, \fBstate\fR, \fBtitle\fR, \fBupdatedAt\fR, \fBurl\fR .SH EXAMPLE .EX # 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 .EE .SH SEE ALSO .PP \fBgh-search(1)\fR