1GH-SEARCH-PRS(1)               GitHub CLI manual              GH-SEARCH-PRS(1)
2
3
4

NAME

6       gh-search-prs - Search for pull requests
7
8
9

SYNOPSIS

11       gh search prs [<query>] [flags]
12
13
14

DESCRIPTION

16       Search for pull requests on GitHub.
17
18
19       The  command supports constructing queries using the GitHub search syn‐
20       tax, using the parameter and qualifier flags, or a combination  of  the
21       two.
22
23
24       GitHub  search syntax is documented at: https://docs.github.com/search-
25       github/searching-on-github/searching-issues-and-pull-requests
26https://docs.github.com/search-github/searching-on-github/searching-
27       issues-and-pull-requests⟩
28
29
30

OPTIONS

32       --app <string>
33              Filter by GitHub App author
34
35
36       --archived
37              Restrict search to archived repositories
38
39
40       --assignee <string>
41              Filter by assignee
42
43
44       --author <string>
45              Filter by author
46
47
48       -B, --base <string>
49              Filter on base branch name
50
51
52       --checks <string>
53              Filter based on status of the checks: {pending|success|failure}
54
55
56       --closed <date>
57              Filter on closed at date
58
59
60       --commenter <user>
61              Filter based on comments by user
62
63
64       --comments <number>
65              Filter on number of comments
66
67
68       --created <date>
69              Filter based on created at date
70
71
72       --draft
73              Filter based on draft state
74
75
76       -H, --head <string>
77              Filter on head branch name
78
79
80       --interactions <number>
81              Filter on number of reactions and comments
82
83
84       --involves <user>
85              Filter based on involvement of user
86
87
88       -q, --jq <expression>
89              Filter JSON output using a jq expression
90
91
92       --json <fields>
93              Output JSON with the specified fields
94
95
96       --label <strings>
97              Filter on label
98
99
100       --language <string>
101              Filter based on the coding language
102
103
104       -L, --limit <int>
105              Maximum number of results to fetch
106
107
108       --locked
109              Filter on locked conversation status
110
111
112       --match <strings>
113              Restrict search to specific  field  of  issue:  {title|body|com‐
114              ments}
115
116
117       --mentions <user>
118              Filter based on user mentions
119
120
121       --merged
122              Filter based on merged state
123
124
125       --merged-at <date>
126              Filter on merged at date
127
128
129       --milestone <title>
130              Filter by milestone title
131
132
133       --no-assignee
134              Filter on missing assignee
135
136
137       --no-label
138              Filter on missing label
139
140
141       --no-milestone
142              Filter on missing milestone
143
144
145       --no-project
146              Filter on missing project
147
148
149       --order <string>
150              Order of results returned, ignored unless '--sort' flag is spec‐
151              ified: {asc|desc}
152
153
154       --owner <string>
155              Filter on repository owner
156
157
158       --project <number>
159              Filter on project board number
160
161
162       --reactions <number>
163              Filter on number of reactions
164
165
166       --repo <strings>
167              Filter on repository
168
169
170       --review <string>
171              Filter    based    on    review    status:    {none|required|ap‐
172              proved|changes_requested}
173
174
175       --review-requested <user>
176              Filter on user or team requested to review
177
178
179       --reviewed-by <user>
180              Filter on user who reviewed
181
182
183       --sort <string>
184              Sort   fetched  results:  {comments|reactions|reactions-+1|reac‐
185              tions--1|reactions-smile|reactions-thinking_face|reactions-
186              heart|reactions-tada|interactions|created|updated}
187
188
189       --state <string>
190              Filter based on state: {open|closed}
191
192
193       --team-mentions <string>
194              Filter based on team mentions
195
196
197       -t, --template <string>
198              Format JSON output using a Go template
199
200
201       --updated <date>
202              Filter on last updated at date
203
204
205       --visibility <strings>
206              Filter based on repository visibility: {public|private|internal}
207
208
209       -w, --web
210              Open the search query in the web browser
211
212
213

EXAMPLE

215              # search pull requests matching set of keywords "fix" and "bug"
216              $ gh search prs fix bug
217
218              # search draft pull requests in cli repository
219              $ gh search prs --repo=cli/cli --draft
220
221              # search open pull requests requesting your review
222              $ gh search prs --review-requested=@me --state=open
223
224              # search merged pull requests assigned to yourself
225              $ gh search prs --assignee=@me --merged
226
227              # search pull requests with numerous reactions
228              $ gh search prs --reactions=">100"
229
230              # search pull requests without label "bug"
231              $ gh search prs -- -label:bug
232
233
234
235
236

SEE ALSO

238       gh-search(1)
239
240
241
242                                   Jun 2022                   GH-SEARCH-PRS(1)
Impressum