blob: 109500251cd1bbda347e1ddb21106bcb28840c9a [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002= Gerrit Code Review - Searching Changes
Shawn O. Pearce51d008d2010-07-16 18:34:31 -07003
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08004== Default Searches
Shawn O. Pearce51d008d2010-07-16 18:34:31 -07005
6Most basic searches can be viewed by clicking on a link along the top
7menu bar. The link will prefill the search box with a common search
David Pursehousedaf6dfc2018-03-21 16:12:50 +09008query, execute it, and present the results.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -07009
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +010010[options="header"]
Leopold Schabeld0c38632022-09-19 14:36:51 +020011|=======================================================
12|Description | Default Query
13|Changes > Open | status:open '(or is:open)'
14|Changes > Merged | status:merged
15|Changes > Abandoned | status:abandoned
16|Your > Watched Changes | is:watched is:open
17|Your > Starred Changes | is:starred
18|Your > Draft Comments | has:draft
19|Your > Edits | has:edit
20|Your > All Visible Changes | is:visible
21|Open changes in Foo | status:open project:Foo
22|=======================================================
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070023
Shawn O. Pearce757df062012-11-30 11:20:37 -080024
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== Basic Change Search
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070026
27Similar to many popular search engines on the web, just enter some
28text and let Gerrit figure out the meaning:
29
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +010030[options="header"]
31|=============================================================
32|Description | Examples
Sven Selberg45ca1782023-01-09 08:32:27 +000033|Change Id | 15183
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +010034|Full or abbreviated Change-Id | Ic0ff33
35|Full or abbreviated commit SHA-1 | d81b32ef
36|Email address | user@example.com
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +010037|=============================================================
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070038
Sven Selberg45ca1782023-01-09 08:32:27 +000039For change searches (i.e. those using a change number, Change-Id, or commit
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +020040SHA-1), if the search results in a single change that change will be
David Pursehousebffb8c22018-03-22 11:56:26 +090041presented instead of a list.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070042
David Pursehouse36236ca2018-04-19 16:17:14 +020043For more predictable results, use explicit search operators as described
44in the following section.
45
Youssef Elghareeb843f2182023-01-19 12:29:08 +010046[IMPORTANT]
47--
48The change search API is backed by a secondary index and might sometimes return
49stale results if the re-indexing operation failed for a change update.
50
51Please also note that changes are not re-indexed if the project configuration
52is updated with newly added or modified
53link:config-submit-requirements.html[submit requirements].
54--
55
56
Edwin Kempin1f556222015-04-22 13:24:39 +020057[[search-operators]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080058== Search Operators
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070059
60Operators act as restrictions on the search. As more operators
61are added to the same query string, they further restrict the
monica.dionisio7dfa0d22010-08-27 11:46:33 -030062returned results. Search can also be performed by typing only a
Dave Borowitz4c27b102014-03-25 12:38:37 -070063text with no operator, which will match against a variety of fields.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -070064
Youssef Elghareebab292f02021-11-18 15:36:54 +010065Characters in operator values can be escaped by enclosing the value with
66double quotes and escaping characters with a backslash. For example
67`message:"This \"is\" fixing a bug"`.
68
Shawn O. Pearce51e058f62010-07-19 10:30:37 -070069[[age]]
70age:'AGE'::
71+
72Amount of time that has expired since the change was last updated
73with a review comment or new patch set. The age must be specified
Patrick Hieseld34b6ac2019-07-15 08:54:58 +020074to include a unit suffix, for example `-age:2d`:
Shawn O. Pearce51e058f62010-07-19 10:30:37 -070075+
76* s, sec, second, seconds
77* m, min, minute, minutes
78* h, hr, hour, hours
79* d, day, days
80* w, week, weeks (`1 week` is treated as `7 days`)
81* mon, month, months (`1 month` is treated as `30 days`)
82* y, year, years (`1 year` is treated as `365 days`)
83
Patrick Hieseld34b6ac2019-07-15 08:54:58 +020084`age` can be used both forward and backward looking: `age:2d`
85means 'everything older than 2 days' while `-age:2d` means
86'everything with an age of at most 2 days'.
87
Joerg Zieren82b6f4f2020-03-24 14:41:20 +010088[[attention]]
89attention:'USER'::
90+
91Changes whose attention set includes the given user.
92
Dave Borowitza0af7fe2014-02-11 16:43:36 -080093[[before_until]]
Edwin Kempin074c9c42014-03-14 14:22:33 +010094before:'TIME'/until:'TIME'::
Dave Borowitza0af7fe2014-02-11 16:43:36 -080095+
Dave Borowitz62c9a2c2014-02-24 08:20:45 -080096Changes modified before the given 'TIME', inclusive. Must be in the
97format `2006-01-02[ 15:04:05[.890][ -0700]]`; omitting the time defaults
98to 00:00:00 and omitting the timezone defaults to UTC.
Dave Borowitza0af7fe2014-02-11 16:43:36 -080099
100[[after_since]]
Edwin Kempin074c9c42014-03-14 14:22:33 +0100101after:'TIME'/since:'TIME'::
Dave Borowitza0af7fe2014-02-11 16:43:36 -0800102+
Dave Borowitz62c9a2c2014-02-24 08:20:45 -0800103Changes modified after the given 'TIME', inclusive. Must be in the
104format `2006-01-02[ 15:04:05[.890][ -0700]]`; omitting the time defaults
105to 00:00:00 and omitting the timezone defaults to UTC.
Dave Borowitza0af7fe2014-02-11 16:43:36 -0800106
Marija Savtchouk1f1f3982020-12-08 09:06:41 +0000107[[mergedbefore]]
108mergedbefore:'TIME'::
109+
110Changes merged before the given 'TIME'. The matching behaviour is consistent
111with `before:'TIME'`.
112
113[[mergedafter]]
114mergedafter:'TIME'::
115+
116Changes merged after the given 'TIME'. The matching behaviour is consistent
117with `after:'TIME'`.
118
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700119[[change]]
120change:'ID'::
121+
Sven Selberg45ca1782023-01-09 08:32:27 +0000122Either a change number such as 15183, or a Change-Id from the Change-Id footer.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700123
Edwin Kempin10b49dc2013-06-28 23:21:10 +0200124[[conflicts]]
125conflicts:'ID'::
126+
Edwin Kempin86e83622013-07-04 09:47:13 +0200127Changes that conflict with change 'ID'. Change 'ID' can be specified
Sven Selberg45ca1782023-01-09 08:32:27 +0000128as a change number such as 15183, or a Change-Id from the Change-Id footer.
Edwin Kempin10b49dc2013-06-28 23:21:10 +0200129
Martin Fick563a3e62015-04-02 13:37:53 -0600130[[destination]]
Prudhvi Akhil Alahari01822da2023-07-17 17:00:38 +0530131destination:'[name=]NAME[,user=USER|,group=GROUP]'::
Martin Fick563a3e62015-04-02 13:37:53 -0600132+
Prudhvi Akhil Alahari01822da2023-07-17 17:00:38 +0530133Changes which match the specified USER's or GROUP's destination named 'NAME'.
134If 'USER' is unspecified, the current user is used. The named destinations can
135be publicly accessible by other users.
136The value may be wrapped in double quotes to include spaces. For example,
137`destination:"myreviews,group=My Group"`
Martin Fick563a3e62015-04-02 13:37:53 -0600138(see link:user-named-destinations.html[Named Destinations]).
139
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700140[[owner]]
Shawn Pearcef5c67c12013-11-25 10:31:13 -0800141owner:'USER', o:'USER'::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700142+
Shawn O. Pearce068a0d82012-04-07 14:59:11 -0700143Changes originally submitted by 'USER'. The special case of
144`owner:self` will find changes owned by the caller.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700145
Martin Fickbcb5b9b2011-01-13 13:16:20 -0700146[[ownerin]]
147ownerin:'GROUP'::
148+
Edwin Kempin28c50a42018-04-18 10:00:27 +0200149Changes originally submitted by a user in 'GROUP'.
Martin Fickbcb5b9b2011-01-13 13:16:20 -0700150
Patrick Hieselec5d10b2021-10-21 10:28:40 +0200151[[uploader]]
152uploader:'USER'::
153+
154Changes where the latest patch set was uploaded by 'USER'.
155The special case of `uploader:self` will find changes uploaded
156by the caller.
157
158[[uploaderin]]
159uploaderin:'GROUP'::
160+
161Changes where the latest patch set was uploaded by a user in
162'GROUP'.
163
Martin Fick5e5a36f2015-03-30 12:44:51 -0600164[[query]]
Prudhvi Akhil Alahari32d5ba92023-07-20 22:07:50 +0530165query:'[name=]NAME[,user=USER|,group=GROUP]'::
Martin Fick5e5a36f2015-03-30 12:44:51 -0600166+
Prudhvi Akhil Alahari32d5ba92023-07-20 22:07:50 +0530167Changes which match the specified USER's or GROUP's query named 'NAME'.
168If neither 'USER' nor 'GROUP' is specified, the current user is used.
169The named queries can be publicly accessible by other users.
170The value may be wrapped in double quotes to include spaces. For example,
171`query:"myquery,group=My Group"`
Martin Fick5e5a36f2015-03-30 12:44:51 -0600172(see link:user-named-queries.html[Named Queries]).
173
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700174[[reviewer]]
Shawn Pearcef5c67c12013-11-25 10:31:13 -0800175reviewer:'USER', r:'USER'::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700176+
Shawn O. Pearce068a0d82012-04-07 14:59:11 -0700177Changes that have been, or need to be, reviewed by 'USER'. The
178special case of `reviewer:self` will find changes where the caller
179has been added as a reviewer.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700180
Dave Borowitz49267dd2017-02-22 15:55:13 -0500181[[cc]]
182cc:'USER'::
183+
184Changes that have the given user CC'ed on them. The special case of `cc:self`
185will find changes where the caller has been CC'ed.
186
Patrick Hiesela54d25c2017-07-13 13:13:27 +0200187[[revertof]]
188revertof:'ID'::
189+
Sven Selberg45ca1782023-01-09 08:32:27 +0000190Changes that revert the change specified by the change number.
Patrick Hiesela54d25c2017-07-13 13:13:27 +0200191
Gal Paikin63f23e32019-11-13 16:19:51 -0800192[[submissionid]]
193submissionid:'ID'::
194+
195Changes that have the specified submission 'ID'.
196
Martin Fickbcb5b9b2011-01-13 13:16:20 -0700197[[reviewerin]]
198reviewerin:'GROUP'::
199+
Edwin Kempin28c50a42018-04-18 10:00:27 +0200200Changes that have been, or need to be, reviewed by a user in 'GROUP'.
Martin Fickbcb5b9b2011-01-13 13:16:20 -0700201
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700202[[commit]]
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +0200203commit:'SHA-1'::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700204+
Han-Wen Nienhuys37a1cab2021-04-01 12:46:00 +0200205Changes where 'SHA-1' is one of the patch sets of the change.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700206
207[[project]]
Shawn Pearcef5c67c12013-11-25 10:31:13 -0800208project:'PROJECT', p:'PROJECT'::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700209+
Edwin Kempinf1acbb82011-09-15 12:49:42 +0200210Changes occurring in 'PROJECT'. If 'PROJECT' starts with `^` it
Magnus Bäcke5611832011-02-02 08:57:15 +0100211matches project names by regular expression. The
212link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100213library,role=external,window=_blank] is used for evaluation of such patterns.
Magnus Bäcke5611832011-02-02 08:57:15 +0100214
Dave Borowitz4aed07b2014-03-25 14:17:03 -0700215[[projects]]
216projects:'PREFIX'::
217+
218Changes occurring in projects starting with 'PREFIX'.
219
Prudhvi Akhil Alahari3593b3e2021-02-22 17:24:05 +0530220[[parentof]]
221parentof:'ID'::
222Changes which are parent to the change specified by 'ID'. Change 'ID' can be
Sven Selberg45ca1782023-01-09 08:32:27 +0000223specified as a change number such as 15183, or a Change-Id from the 'Change-Id'
224footer of the commit message. This operator will return immediate parents
Prudhvi Akhil Alahari3593b3e2021-02-22 17:24:05 +0530225and will not return grand parents or higher level ancestors of the given change.
226
Edwin Kempin7c0eb412013-06-28 02:05:14 +0200227[[parentproject]]
228parentproject:'PROJECT'::
229+
230Changes occurring in 'PROJECT' or in one of the child projects of
231'PROJECT'.
232
Patrick Hiesel0d08afc2018-07-31 10:33:13 +0200233[[repository]]
Edwin Kempinc4a10ce2018-09-27 09:02:48 +0200234repository:'REPOSITORY', repo:'REPOSITORY'::
Patrick Hiesel0d08afc2018-07-31 10:33:13 +0200235+
236Changes occurring in 'REPOSITORY'. If 'REPOSITORY' starts with `^` it
237matches repository names by regular expression. The
238link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100239library,role=external,window=_blank] is used for evaluation of such patterns.
Patrick Hiesel0d08afc2018-07-31 10:33:13 +0200240
241[[repositories]]
Edwin Kempinc4a10ce2018-09-27 09:02:48 +0200242repositories:'PREFIX', repos:'PREFIX'::
Patrick Hiesel0d08afc2018-07-31 10:33:13 +0200243+
244Changes occurring in repositories starting with 'PREFIX'.
245
246[[parentrepository]]
Edwin Kempinc4a10ce2018-09-27 09:02:48 +0200247parentrepository:'REPOSITORY', parentrepo:'REPOSITORY'::
Patrick Hiesel0d08afc2018-07-31 10:33:13 +0200248+
249Changes occurring in 'REPOSITORY' or in one of the child repositories of
250'REPOSITORY'.
251
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700252[[branch]]
253branch:'BRANCH'::
254+
Edwin Kempinad921cd2012-03-27 16:00:56 +0200255Changes for 'BRANCH'. The branch name is either the short name shown
256in the web interface or the full name of the destination branch with
257the traditional 'refs/heads/' prefix.
Shawn O. Pearce082ed412010-08-28 12:38:32 -0700258+
259If 'BRANCH' starts with `^` it matches branch names by regular
Magnus Bäcke5611832011-02-02 08:57:15 +0100260expression patterns. The
261link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100262library,role=external,window=_blank] is used for evaluation of such patterns.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700263
Dave Borowitzc7517992015-06-01 10:00:04 -0700264[[intopic]]
265intopic:'TOPIC'::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700266+
Stefan Bellerf89a9592015-05-29 11:37:37 -0700267Changes whose designated topic contains 'TOPIC', using a full-text search.
Shawn O. Pearce082ed412010-08-28 12:38:32 -0700268+
269If 'TOPIC' starts with `^` it matches topic names by regular
Magnus Bäcke5611832011-02-02 08:57:15 +0100270expression patterns. The
271link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100272library,role=external,window=_blank] is used for evaluation of such patterns.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700273
Dave Borowitzc7517992015-06-01 10:00:04 -0700274[[topic]]
275topic:'TOPIC'::
Stefan Bellerf89a9592015-05-29 11:37:37 -0700276+
277Changes whose designated topic matches 'TOPIC' exactly. This is
278often combined with 'branch:' and 'project:' operators to select
279all related changes in a series.
280
Gal Paikinc3e6ddc2021-12-28 12:42:45 +0100281[[prefixtopic]]
282prefixtopic:'TOPIC'::
283+
284Changes whose designated topic start with 'TOPIC'.
285
Patrick Hiesel279bb472021-03-05 15:19:47 +0100286[[inhashtag]]
287inhashtag:'HASHTAG'::
288+
289Changes where any hashtag contains 'HASHTAG', using a full-text search.
290+
291If 'HASHTAG' starts with `^` it matches hashtag names by regular
292expression patterns. The
293link:http://www.brics.dk/automaton/[dk.brics.automaton
294library,role=external,window=_blank] is used for evaluation of such patterns.
295
Dave Borowitz223f73c2018-03-15 10:35:29 -0400296[[hashtag]]
297hashtag:'HASHTAG'::
298+
David Pursehoused2ca2b12019-03-07 09:52:28 +0900299Changes whose link:intro-user.html#hashtags[hashtag] matches 'HASHTAG'.
300The match is case-insensitive.
Dave Borowitz223f73c2018-03-15 10:35:29 -0400301
Gal Paikinc3e6ddc2021-12-28 12:42:45 +0100302[[prefixhashtag]]
303prefixhashtag:'HASHTAG'::
304+
305Changes whose link:intro-user.html#hashtags[hashtag] start with 'HASHTAG'.
306The match is case-insensitive.
307
Kaushik Lingarkar4a711ed2019-11-12 13:53:29 -0800308[[cherrypickof]]
309cherrypickof:'CHANGE[,PATCHSET]'::
310+
311Changes which were created using the 'cherry-pick' functionality and
312whose source change number matches 'CHANGE' and source patchset number
313matches 'PATCHSET'. Note that 'PATCHSET' is optional. For example, a
314`cherrypickof:12345` matches all changes which were cherry-picked from
315change 12345 and `cherrypickof:12345,2` matches all changes which were
316cherry-picked from the 2nd patchset of change 12345.
317
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700318[[ref]]
319ref:'REF'::
320+
321Changes where the destination branch is exactly the given 'REF'
322name. Since 'REF' is absolute from the top of the repository it
323must start with 'refs/'.
Shawn O. Pearce082ed412010-08-28 12:38:32 -0700324+
325If 'REF' starts with `^` it matches reference names by regular
Magnus Bäcke5611832011-02-02 08:57:15 +0100326expression patterns. The
327link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100328library,role=external,window=_blank] is used for evaluation of such patterns.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700329
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100330[[tr,bug]]
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700331tr:'ID', bug:'ID'::
332+
David Pursehouse221d4f62012-06-08 17:38:08 +0900333Search for changes whose commit message contains 'ID' and matches
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700334one or more of the
335link:config-gerrit.html#trackingid[trackingid sections]
336in the server's configuration file. This is typically used to
337search for changes that fix a bug or defect by the issue tracking
338system's issue identifier.
339
340[[label]]
341label:'VALUE'::
342+
343Matches changes where the approval score 'VALUE' has been set during
344a review. See <<labels,labels>> below for more detail on the format
345of the argument.
346
monica.dionisio70a7ca02010-08-25 14:46:13 -0300347[[message]]
Thiago Perrotta4daf87e2023-11-07 16:20:11 +0100348message:'MESSAGE'::, m:'MESSAGE'::, description:'MESSAGE'::, d:'MESSAGE'::
monica.dionisio70a7ca02010-08-25 14:46:13 -0300349+
David Pursehouse221d4f62012-06-08 17:38:08 +0900350Changes that match 'MESSAGE' arbitrary string in the commit message body.
Patrick Hieselcef4afe2022-02-21 16:18:45 +0100351By default full text matching is used, but regular expressions can be
352enabled by starting with `^`.
353The link:http://www.brics.dk/automaton/[dk.brics.automaton library,role=external,window=_blank]
Thomas Draebing0648b5f2022-09-16 09:25:55 +0200354is used for the evaluation of such patterns. Note, that searching with
355regular expressions is limited to the first 32766 bytes of the
356commit message due to limitations in Lucene.
monica.dionisio70a7ca02010-08-25 14:46:13 -0300357
Edwin Kempincf2d1092022-12-16 14:01:49 +0100358[[subject]]
359subject:'SUBJECT'::
360+
361Changes that have a commit message where the first line (aka the subject)
362matches 'SUBJECT'. The matching is done by full text search over the subject.
363
Edwin Kempin115eb6de2022-12-16 13:16:03 +0100364[[prefixsubject]]
365prefixsubject:'PREFIX'::
366+
367Changes that have a commit message where the first line (aka the subject)
368has the prefix 'PREFIX'.
369
Shawn Pearce3ffbd1b2013-09-13 14:11:07 -0700370[[comment]]
371comment:'TEXT'::
372+
373Changes that match 'TEXT' string in any comment left by a reviewer.
374
Dave Borowitz64e0b072013-12-27 11:38:01 -0800375[[path]]
376path:'PATH'::
Shawn O. Pearce50756b92010-07-19 17:58:25 -0700377+
Shawn Pearcef5c67c12013-11-25 10:31:13 -0800378Matches any change touching file at 'PATH'. By default exact path
379matching is used, but regular expressions can be enabled by starting
Paul Fertser99143752021-08-23 10:34:51 +0000380with `^`. For example, to match all XML files use `file:"^.*\.xml$"`.
Marian Harbach34253372019-12-10 18:01:31 +0100381The link:http://www.brics.dk/automaton/[dk.brics.automaton library,role=external,window=_blank]
Shawn Pearcef5c67c12013-11-25 10:31:13 -0800382is used for the evaluation of such patterns.
rafael.rabelosilvaaa5bca72010-08-26 11:04:53 +0200383+
Ben Rohlfsb2c411c2023-03-27 09:46:42 +0200384Note that the Gerrit host may not support regular expression search.
385You will then see an error dialog when using expressions starting with
386`^`.
387+
Karsten Dambekalnsa7f72a22011-03-25 14:21:59 +0100388The `^` required at the beginning of the regular expression not only
rafael.rabelosilvaaa5bca72010-08-26 11:04:53 +0200389denotes a regular expression, but it also has the usual meaning of
390anchoring the match to the start of the string. To match all Java
391files, use `file:^.*\.java`.
392+
Edwin Kempincdb0e002011-09-08 14:23:30 +0200393The entire regular expression pattern, including the `^` character,
Hong Xuf0e245c2022-04-30 01:20:30 +0000394can be double quoted. For example, to match all XML
rafael.rabelosilvaaa5bca72010-08-26 11:04:53 +0200395files named like 'name1.xml', 'name2.xml', and 'name3.xml' use
Edwin Kempincdb0e002011-09-08 14:23:30 +0200396`file:"^name[1-3].xml"`.
Edwin Kempina6289ca2019-01-29 12:05:09 +0100397+
398Slash ('/') is used path separator.
Marco Millerf6bde272020-10-30 10:44:18 -0400399+
Sven Selberg8218b2b2021-08-20 10:55:33 +0200400*More examples:*
401
Hong Xuf0e245c2022-04-30 01:20:30 +0000402* `-path:^path/.*` - changes that do not modify files from `path/`.
403* `path:{^~(path/.*)}` - changes that modify files not from `path/` (but may
Vitaliy Lotoreve8f6fc92020-05-26 19:58:14 +0000404contain files from `path/`).
Shawn O. Pearce50756b92010-07-19 17:58:25 -0700405
Dave Borowitz64e0b072013-12-27 11:38:01 -0800406[[file]]
407file:'NAME', f:'NAME'::
408+
409Matches any change touching a file containing the path component
410'NAME'. For example a `file:src` will match changes that modify
411files named `gerrit-server/src/main/java/Foo.java`. Name matching
412is exact match, `file:Foo.java` finds any change touching a file
413named exactly `Foo.java` and does not match `AbstractFoo.java`.
414+
415Regular expression matching can be enabled by starting the string
416with `^`. In this mode `file:` is an alias of `path:` (see above).
417
Dave Borowitze9396932019-01-11 11:42:56 -0800418[[extension]]
419extension:'EXT', ext:'EXT'::
420+
421Matches any change touching a file with extension 'EXT', case-insensitive. The
422extension is defined as the portion of the filename following the final `.`.
Edwin Kempine8079ce2019-01-29 12:15:37 +0100423Files with no `.` in their name have no extension and can be matched by an
424empty string.
Dave Borowitze9396932019-01-11 11:42:56 -0800425
Edwin Kempin2b2f3892019-01-25 10:34:07 +0100426[[onlyextensions]]
427onlyextensions:'EXT_LIST', onlyexts:'EXT_LIST'::
428+
429Matches any change touching only files with extensions that are listed in
430'EXT_LIST' (comma-separated list). The matching is done case-insensitive.
431An extension is defined as the portion of the filename following the final `.`.
432Files with no `.` in their name have no extension and can be matched by an
433empty string.
434
Edwin Kempin0e88d5d2019-01-25 15:20:52 +0100435[[directory]]
436directory:'DIR', dir:'DIR'::
437+
438Matches any change where the current patch set touches a file in the directory
439'DIR'. The matching is done case-insensitive. 'DIR' can be a full directory
440name, a directory prefix or any combination of intermediate directory segments.
441E.g. a change that touches a file in the directory 'a/b/c' matches for 'a/b/c',
442'a', 'a/b', 'b', 'b/c' and 'c'.
443+
444Slash ('/') is used path separator. Leading and trailing slashes are allowed
445but are not mandatory.
Edwin Kempin0ae48b32019-01-29 17:15:09 +0100446+
447If 'DIR' starts with `^` it matches directories and directory segments by
448regular expression. The link:http://www.brics.dk/automaton/[dk.brics.automaton
Marian Harbach34253372019-12-10 18:01:31 +0100449library,role=external,window=_blank] is used for evaluation of such patterns.
Edwin Kempin0e88d5d2019-01-25 15:20:52 +0100450
Edwin Kempinfa2a826d2019-05-20 13:33:54 +0200451[[footer-operator]]
Edwin Kempinf148c792019-01-28 10:24:13 +0100452footer:'FOOTER'::
453+
454Matches any change that has 'FOOTER' as footer in the commit message of the
455current patch set. 'FOOTER' can be specified verbatim ('<key>: <value>', must
456be quoted) or as '<key>=<value>'. The matching is done case-insensitive.
457
Patrick Hieselb0701ee2022-02-01 13:34:10 +0100458[[hasfooter-operator]]
459hasfooter:'FOOTERNAME'::
460+
461Matches any change that has a commit message with a footer where the footer
462name is equal to 'FOOTERNAME'.The matching is done case-sensitive.
463
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700464[[has]]
465has:draft::
466+
467True if there is a draft comment saved by the current user.
468
Edwin Kempin9e972cc2016-04-15 10:39:13 +0200469[[has-star]]
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700470has:star::
471+
Chris Poucet79b89e22022-08-23 14:54:13 +0000472Same as 'is:starred', true if the change has been starred by the current user
473with the default label.
Edwin Kempin9e972cc2016-04-15 10:39:13 +0200474
David Ostrovsky99528702015-04-30 23:48:35 +0200475has:edit::
476+
477True if the change has inline edit created by the current user.
478
Changcheng Xiao81c48092017-02-08 13:04:07 +0100479has:unresolved::
480+
481True if the change has unresolved comments.
482
Paladox nonea9c9b042021-08-04 07:04:41 +0000483has:attention::
484+
485True if the change has attention by the current user.
486
487
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700488[[is]]
Edwin Kempin9e972cc2016-04-15 10:39:13 +0200489[[is-starred]]
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700490is:starred::
491+
492Same as 'has:star', true if the change has been starred by the
Edwin Kempin9e972cc2016-04-15 10:39:13 +0200493current user with the default label.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700494
Paladox nonea9c9b042021-08-04 07:04:41 +0000495is:attention::
496+
497True if the change has attention by the current user.
498
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700499is:watched::
500+
501True if this change matches one of the current user's watch filters,
502and thus is likely to notify the user when it updates.
503
504is:reviewed::
505+
Dave Borowitz8ee50e72015-05-25 19:34:34 -0700506True if any user has commented on the change more recently than the
507last update (comment or patch set) from the change owner.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700508
Shawn O. Pearce068a0d82012-04-07 14:59:11 -0700509is:owner::
510+
511True on any change where the current user is the change owner.
512Same as `owner:self`.
513
Patrick Hieselec5d10b2021-10-21 10:28:40 +0200514is:uploader::
515+
516True on any change where the current user is the uploader of
517the latest patch set.
518Same as `uploader:self`.
519
Shawn O. Pearce068a0d82012-04-07 14:59:11 -0700520is:reviewer::
521+
522True on any change where the current user is a reviewer.
523Same as `reviewer:self`.
524
David Pursehoused58e4732018-04-16 11:56:44 +0200525is:cc::
526+
527True on any change where the current user is in CC.
528Same as `cc:self`.
529
David Pursehousee3eccbd2019-08-30 16:44:35 +0900530is:open, is:pending, is:new::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700531+
Shawn Pearce80fa0b62015-09-04 16:28:50 -0700532True if the change is open.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700533
534is:closed::
535+
536True if the change is either merged or abandoned.
537
Stefan Beller7bf178c42016-03-07 11:15:26 -0800538is:merged, is:abandoned::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700539+
540Same as <<status,status:'STATE'>>.
541
Youssef Elghareeb84bcb6a2022-01-14 11:41:53 +0100542[[is-submittable]]
Dave Borowitz6453fce2016-09-22 16:11:56 +0200543is:submittable::
544+
545True if the change is submittable according to the submit rules for
546the project, for example if all necessary labels have been voted on.
547+
548This operator only takes into account one change at a time, not any
549related changes, and does not guarantee that the submit button will
550appear for matching changes. To check whether a submit button appears,
551use the
552link:rest-api-changes.html#get-revision-actions[Get Revision Actions]
553API.
Dave Borowitz6453fce2016-09-22 16:11:56 +0200554
Edwin Kempin6076b7a2014-05-14 14:52:16 +0200555[[mergeable]]
Edwin Kempincfd5d252013-11-22 16:53:09 +0100556is:mergeable::
557+
558True if the change has no merge conflicts and could be merged into its
559destination branch.
Saša Živkova8035932017-03-21 17:37:29 +0100560+
561Mergeability of abandoned changes is not computed. This operator will
562not find any abandoned but mergeable changes.
Patrick Hiesel493875f2020-03-02 15:09:21 +0100563+
564This operator only works if Gerrit indexes 'mergeable'. See
Vitaliy L.98ef4542022-07-11 09:19:04 +0000565link:config-gerrit.html#change.mergeabilityComputationBehavior[change.mergeabilityComputationBehavior]
Patrick Hiesel493875f2020-03-02 15:09:21 +0100566for details.
Edwin Kempincfd5d252013-11-22 16:53:09 +0100567
Edwin Kempin98ddc8a2017-02-21 11:56:08 +0100568[[private]]
569is:private::
570+
571True if the change is private, ie. only visible to owner and its
572reviewers.
573
David Ostrovsky6cfcb372017-02-26 09:57:41 +0100574[[workInProgress]]
575is:wip::
576+
577True if the change is Work In Progress.
578
Saša Živkov71fd9982015-11-04 15:12:34 +0100579[[merge]]
580is:merge::
581+
582True if the change is a merge commit.
583
Adithya Chakilamb568ec32021-09-08 19:00:22 -0500584[[cherrypick]]
585is:cherrypick::
586+
587True if the change is a cherrypick of an another change.
588
589This is limited to changes which are cherrypicked using REST API
590or WebUI only. It is not able to identify changes which are
591cherry-picked locally using the git cherry-pick command and then
592pushed to Gerrit.
593
Youssef Elghareebe9d30ae2021-10-26 14:07:49 +0200594[[pure-revert]]
595is:pure-revert::
596+
597True if the change is a pure revert.
598
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700599[[status]]
David Pursehousee3eccbd2019-08-30 16:44:35 +0900600status:open, status:pending, status:new::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700601+
Shawn Pearce80fa0b62015-09-04 16:28:50 -0700602True if the change state is 'review in progress'.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700603
604status:reviewed::
605+
Dave Borowitz8ee50e72015-05-25 19:34:34 -0700606Same as 'is:reviewed', matches if any user has commented on the change
607more recently than the last update (comment or patch set) from the
608change owner.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700609
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700610status:closed::
611+
612True if the change is either 'merged' or 'abandoned'.
613
614status:merged::
615+
616Change has been merged into the branch.
617
618status:abandoned::
619+
Edwin Kempin4c903b82012-06-13 16:06:07 +0200620Change has been abandoned.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700621
Jeff Davidson45d0a772014-05-21 18:48:33 -0700622[[size]]
623added:'RELATION''LINES', deleted:'RELATION''LINES', delta/size:'RELATION''LINES'::
624+
625True if the number of lines added/deleted/changed satisfies the given relation
626for the given number of lines.
627+
628For example, added:>50 will be true for any change which adds at least 50
629lines.
630+
Vitaliy Lotorevc2285a82020-10-13 20:13:39 +0000631Valid relations are >=, >, \<=, <, or no relation, which will match if the
Jeff Davidson45d0a772014-05-21 18:48:33 -0700632number of lines is exactly equal.
633
Dave Borowitze6e14b92015-03-09 12:36:23 -0700634[[commentby]]
635commentby:'USER'::
636+
637Changes containing a top-level or inline comment by 'USER'. The special
638case of `commentby:self` will find changes where the caller has
Youssef Elghareebaf905782022-10-05 14:34:23 +0200639commented. Note that setting a vote is also considered as a comment.
Dave Borowitze6e14b92015-03-09 12:36:23 -0700640
Dave Borowitz657aa4d2015-03-09 15:00:14 -0700641[[from]]
642from:'USER'::
643+
644Changes containing a top-level or inline comment by 'USER', or owned by
645'USER'. Equivalent to `(owner:USER OR commentby:USER)`.
646
Dave Borowitz8ee50e72015-05-25 19:34:34 -0700647[[reviewedby]]
648reviewedby:'USER'::
649+
650Changes where 'USER' has commented on the change more recently than the
651last update (comment or patch set) from the change owner.
652
David Pursehousecf43e172015-08-03 16:18:04 +0900653[[author]]
Edwin Kempin42d5e932023-03-28 09:12:01 +0200654author:'AUTHOR', a:'AUTHOR'::
David Pursehousecf43e172015-08-03 16:18:04 +0900655+
656Changes where 'AUTHOR' is the author of the current patch set. 'AUTHOR' may be
Orgad Shaneh71cff002021-08-11 14:13:09 +0300657the author's exact email address, or part of the name or email address. The
658special case of `author:self` will find changes authored by the caller.
David Pursehousecf43e172015-08-03 16:18:04 +0900659
660[[committer]]
661committer:'COMMITTER'::
662+
663Changes where 'COMMITTER' is the committer of the current patch set.
664'COMMITTER' may be the committer's exact email address, or part of the name or
Orgad Shaneh71cff002021-08-11 14:13:09 +0300665email address. The special case of `committer:self` will find changes committed
666by the caller.
667
Youssef Elghareeb0f67b812021-08-30 14:16:08 +0200668[[rule]]
669rule:'SUBMIT_RULE_NAME'::
670+
671Changes where 'SUBMIT_RULE_NAME' returns a submit record with status in {OK,
672FORCED}. This means that the submit rule has passed and is not blocking the
673change submission. 'SUBMIT_RULE_NAME' should be in the form of
674'$plugin_name~$rule_name'. For gerrit core rules, 'SUBMIT_RULE_NAME' should
Youssef Elghareeb7032f992022-01-19 15:48:48 +0100675be in the form of 'gerrit~$rule_name' (example: `gerrit~DefaultSubmitRule`).
Youssef Elghareeb0f67b812021-08-30 14:16:08 +0200676
677rule:'SUBMIT_RULE_NAME'='STATUS'::
678+
679Changes where 'SUBMIT_RULE_NAME' returns a submit record with status equals to
680'STATUS'. The status can be any of the statuses that are documented for the
681`status` field of link:rest-api-changes.html#submit-record[SubmitRecord].
682
Changcheng Xiao81c48092017-02-08 13:04:07 +0100683[[unresolved]]
684unresolved:'RELATION''NUMBER'::
685+
686True if the number of unresolved comments satisfies the given relation for the given number.
687+
688For example, unresolved:>0 will be true for any change which has at least one unresolved
689comment while unresolved:0 will be true for any change which has all comments resolved.
690+
Vitaliy Lotorevc2285a82020-10-13 20:13:39 +0000691Valid relations are >=, >, \<=, <, or no relation, which will match if the number of unresolved
Changcheng Xiao81c48092017-02-08 13:04:07 +0100692comments is exactly equal.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700693
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800694== Argument Quoting
Shawn O. Pearce757df062012-11-30 11:20:37 -0800695
696Operator values that are not bare words (roughly A-Z, a-z, 0-9, @,
David Pursehouse92463562013-06-24 10:16:28 +0900697hyphen, dot and underscore) must be quoted for the query parser.
Shawn O. Pearce757df062012-11-30 11:20:37 -0800698
699Quoting is accepted as either double quotes
700(e.g. `message:"the value"`) or as matched
701curly braces (e.g. `message:{the value}`).
702
703
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800704== Boolean Operators
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700705
706Unless otherwise specified, operators are joined using the `AND`
707boolean operator, thereby restricting the search results.
708
David Pursehouse92463562013-06-24 10:16:28 +0900709Parentheses can be used to force a particular precedence on complex
710operator expressions, otherwise OR has higher precedence than AND.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700711
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800712=== Negation
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700713Any operator can be negated by prefixing it with `-`, for example
714`-is:starred` is the exact opposite of `is:starred` and will
715therefore return changes that are *not* starred by the current user.
716
Patrick Hiesel56aaf262022-05-03 12:01:27 +0200717The operator `NOT` (in all caps) or `not` (all lower case) is a
718synonym.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700719
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800720=== AND
Patrick Hiesel56aaf262022-05-03 12:01:27 +0200721The boolean operator `AND` (in all caps) or `and` (all lower case)
722can be used to join two other operators together. This results in
723a restriction of the results, returning only changes that match both
724operators.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700725
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800726=== OR
Patrick Hiesel56aaf262022-05-03 12:01:27 +0200727The boolean operator `OR` (in all caps) or `or` (all lower case)
728can be used to find changes that match either operator. This
729increases the number of results that are returned, as more changes
730are considered.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700731
732
733[[labels]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800734== Labels
David Pursehouse221d4f62012-06-08 17:38:08 +0900735Label operators can be used to match approval scores given during
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700736a code review. The specific set of supported labels depends on
David Pursehouse2f82f2f2013-10-23 09:26:38 +0900737the server configuration, however the `Code-Review` label is provided
738out of the box.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700739
740A label name is any of the following:
741
Dave Borowitz01c1b1f2013-02-27 13:49:04 -0800742* The label name. Example: `label:Code-Review`.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700743
Craig Chapel9c6e5372013-02-13 10:14:08 -0700744* The label name followed by a ',' followed by a reviewer id or a
745 group id. To make it clear whether a user or group is being looked
746 for, precede the value by a user or group argument identifier
747 ('user=' or 'group='). If an LDAP group is being referenced make
748 sure to use 'ldap/<groupname>'.
749
Dave Borowitz6453fce2016-09-22 16:11:56 +0200750A label name must be followed by either a score with optional operator,
751or a label status. The easiest way to explain this is by example.
Edwin Kempin8070fce2017-09-20 13:52:15 +0200752
Dave Borowitz6453fce2016-09-22 16:11:56 +0200753First, some examples of scores with operators:
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700754
Dave Borowitz41f909f2013-02-05 15:34:18 -0800755`label:Code-Review=2`::
756`label:Code-Review=+2`::
757`label:Code-Review+2`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700758+
Dave Borowitz41f909f2013-02-05 15:34:18 -0800759Matches changes where there is at least one +2 score for Code-Review.
Edwin Kempincdb0e002011-09-08 14:23:30 +0200760The + prefix is optional for positive score values. If the + is used,
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700761the = operator is optional.
762
Dave Borowitz41f909f2013-02-05 15:34:18 -0800763`label:Code-Review=-2`::
764`label:Code-Review-2`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700765+
Dave Borowitz41f909f2013-02-05 15:34:18 -0800766Matches changes where there is at least one -2 score for Code-Review.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700767Because the negative sign is required, the = operator is optional.
768
Dave Borowitz41f909f2013-02-05 15:34:18 -0800769`label:Code-Review=1`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700770+
Dave Borowitz41f909f2013-02-05 15:34:18 -0800771Matches changes where there is at least one +1 score for Code-Review.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700772Scores of +2 are not matched, even though they are higher.
773
Dave Borowitz41f909f2013-02-05 15:34:18 -0800774`label:Code-Review>=1`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700775+
776Matches changes with either a +1, +2, or any higher score.
Dave Borowitz6453fce2016-09-22 16:11:56 +0200777+
778Instead of a numeric vote, you can provide a label status corresponding
779to one of the fields in the
780link:rest-api-changes.html#submit-record[SubmitRecord] REST API entity.
781
Youssef Elghareeb27e7a312021-09-22 13:44:04 +0200782`label:Code-Review\<=-1`::
783+
784Matches changes with either a -1, -2, or any lower score.
785
Youssef Elghareeb57b60ae2021-06-11 14:22:31 +0200786`label:Code-Review=MAX`::
787+
788Matches changes with label voted with the highest possible score.
789
790`label:Code-Review=MIN`::
791+
792Matches changes with label voted with the lowest possible score.
793
794`label:Code-Review=ANY`::
795+
796Matches changes with label voted with any score.
797
Youssef Elghareebf6e54642021-10-26 17:26:57 +0200798`label:Code-Review=+1,count=2`::
799+
800Matches changes with exactly two +1 votes to the code-review label. The {MAX,
801MIN, ANY} votes can also be used, for example `label:Code-Review=MAX,count=2` is
802equivalent to `label:Code-Review=2,count=2` (if 2 is the maximum positive vote
803for the code review label). The maximum supported value for `count` is 5.
804`count=0` is not allowed and the query request will fail with `400 Bad Request`.
805
806`label:Code-Review=+1,count>=2`::
807+
808Matches changes having two or more +1 votes to the code-review label. Can also
809be used with the {MAX, MIN, ANY} label votes. All operators `>`, `>=`, `<`, `<=`
810are supported.
811Note that a query like `label:Code-Review=+1,count<x` will not match with
812changes having zero +1 votes to this label.
813
Youssef Elghareebfda0e422022-02-11 14:39:02 +0100814`label:Non-Author-Code-Review=need` (deprecated)::
Dave Borowitz6453fce2016-09-22 16:11:56 +0200815+
816Matches changes where the submit rules indicate that a label named
817`Non-Author-Code-Review` is needed. (See the
818link:prolog-cookbook.html#NonAuthorCodeReview[Prolog Cookbook] for how
819this label can be configured.)
Youssef Elghareebfda0e422022-02-11 14:39:02 +0100820+
821This operator is also compatible with
822link:config-submit-requirements.html[submit requirement] results. A submit
823requirement name could be used instead of the label name. The submit record
824statuses are mapped to submit requirement result statuses as follows:
825+
826 * {`need`, `reject`} -> {`UNSATISFED`}
827 * {`ok`, `may`} -> {`SATISFIED`, `OVERRIDDEN`}
828+
829For example, a query like `label:Code-Review=ok` will also match changes
830having a submit requirement with a result that is either `SATISFIED` or
831`OVERRIDDEN`. Users are encouraged not to rely on this operator since submit
832records are deprecated.
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700833
Edwin Kempinf6c0d522014-01-13 09:17:46 +0100834`label:Code-Review=+2,aname`::
Dave Borowitz6453fce2016-09-22 16:11:56 +0200835`label:Code-Review=ok,aname`::
Craig Chapel9c6e5372013-02-13 10:14:08 -0700836+
837Matches changes with a +2 code review where the reviewer or group is aname.
838
Edwin Kempinf6c0d522014-01-13 09:17:46 +0100839`label:Code-Review=2,user=jsmith`::
Craig Chapel9c6e5372013-02-13 10:14:08 -0700840+
841Matches changes with a +2 code review where the reviewer is jsmith.
842
David Ostrovskydc26bbf2016-07-06 06:45:43 +0200843`label:Code-Review=+2,user=owner`::
Dave Borowitz6453fce2016-09-22 16:11:56 +0200844`label:Code-Review=ok,user=owner`::
David Ostrovskydc26bbf2016-07-06 06:45:43 +0200845`label:Code-Review=+2,owner`::
Dave Borowitz6453fce2016-09-22 16:11:56 +0200846`label:Code-Review=ok,owner`::
David Ostrovskydc26bbf2016-07-06 06:45:43 +0200847+
848The special "owner" parameter corresponds to the change owner. Matches
849all changes that have a +2 vote from the change owner.
850
Edwin Kempin97673c72023-11-30 14:58:01 +0000851[[non_uploader]]
Youssef Elghareebb1647c02021-08-27 12:02:43 +0200852`label:Code-Review=+2,user=non_uploader`::
853`label:Code-Review=ok,user=non_uploader`::
854`label:Code-Review=+2,non_uploader`::
855`label:Code-Review=ok,non_uploader`::
856+
857The special "non_uploader" parameter corresponds to any user who's not the
858uploader of the latest patchset. Matches all changes that have a +2 vote from
859a non upoader.
860
Edwin Kempinf6c0d522014-01-13 09:17:46 +0100861`label:Code-Review=+1,group=ldap/linux.workflow`::
Craig Chapel9c6e5372013-02-13 10:14:08 -0700862+
863Matches changes with a +1 code review where the reviewer is in the
864ldap/linux.workflow group.
865
David Pursehouse48933d32013-09-26 15:21:47 +0900866`is:open label:Code-Review+2 label:Verified+1 NOT label:Verified-1 NOT label:Code-Review-2`::
Dave Borowitz6453fce2016-09-22 16:11:56 +0200867`is:open label:Code-Review=ok label:Verified=ok`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700868+
Dave Borowitz6453fce2016-09-22 16:11:56 +0200869Matches changes that are ready to be submitted according to one common
870label configuration. (For a more general check, use
Youssef Elghareeb84bcb6a2022-01-14 11:41:53 +0100871link:#is-submittable[is:submittable].)
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700872
David Pursehouse48933d32013-09-26 15:21:47 +0900873`is:open (label:Verified-1 OR label:Code-Review-2)`::
David Pursehouse6e5e6e62018-03-21 15:49:34 +0900874`is:open (label:Verified=reject OR label:Code-Review=reject)`::
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700875+
876Changes that are blocked from submission due to a blocking score.
877
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800878== Magical Operators
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700879
880Most of these operators exist to support features of Gerrit Code
881Review, and are not meant to be accessed by the average end-user.
882However, they are recognized by the query parser, and may prove
883useful in limited contexts to administrators or power-users.
884
885visibleto:'USER-or-GROUP'::
886+
887Matches changes that are visible to 'USER' or to anyone who is a
888member of 'GROUP'. Here group names may be specified as either
889an internal group name, or if LDAP is being used, an external LDAP
890group name. The value may be wrapped in double quotes to include
891spaces or other special characters. For example, to match an LDAP
892group: `visibleto:"CN=Developers, DC=example, DC=com"`.
893+
894This operator may be useful to test access control rules, however a
895change can only be matched if both the current user and the supplied
896user or group can see it. This is due to the implicit 'is:visible'
897clause that is always added by the server.
898
899is:visible::
900+
901Magical internal flag to prove the current user has access to read
902the change. This flag is always added to any query.
903
Edwin Kempin1f556222015-04-22 13:24:39 +0200904[[limit]]
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700905limit:'CNT'::
906+
907Limit the returned results to no more than 'CNT' records. This is
908automatically set to the page size configured in the current user's
909preferences. Including it in a web query may lead to unpredictable
910results with regards to pagination.
911
Shawn O. Pearce51d008d2010-07-16 18:34:31 -0700912GERRIT
913------
914Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700915
916SEARCHBOX
917---------