Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 1 | Gerrit Code Review - Searching Changes |
| 2 | ====================================== |
| 3 | |
Robin Rosenberg | 524a303 | 2012-10-14 14:24:36 +0200 | [diff] [blame] | 4 | Default Searches |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 5 | ---------------- |
| 6 | |
| 7 | Most basic searches can be viewed by clicking on a link along the top |
| 8 | menu bar. The link will prefill the search box with a common search |
| 9 | query, execute it, and present the results. If exactly one change |
| 10 | matches the search, the change will be presented instead of a list. |
| 11 | |
| 12 | |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 13 | [options="header"] |
| 14 | |================================================= |
| 15 | |Description | Default Query |
| 16 | |All > Open | status:open '(or is:open)' |
| 17 | |All > Merged | status:merged |
| 18 | |All > Abandoned | status:abandoned |
Deniz Türkoglu | d6799b1d | 2012-05-10 11:20:56 -0700 | [diff] [blame] | 19 | |My > Drafts | is:draft |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 20 | |My > Watched Changes | status:open is:watched |
| 21 | |My > Starred Changes | is:starred |
Deniz Türkoglu | d6799b1d | 2012-05-10 11:20:56 -0700 | [diff] [blame] | 22 | |My > Draft Comments | has:draft |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 23 | |Open changes in Foo | status:open project:Foo |
| 24 | |================================================= |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 25 | |
Shawn O. Pearce | 757df06 | 2012-11-30 11:20:37 -0800 | [diff] [blame] | 26 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 27 | Basic Change Search |
| 28 | ------------------- |
| 29 | |
| 30 | Similar to many popular search engines on the web, just enter some |
| 31 | text and let Gerrit figure out the meaning: |
| 32 | |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 33 | [options="header"] |
| 34 | |============================================================= |
| 35 | |Description | Examples |
| 36 | |Legacy numerical id | 15183 |
| 37 | |Full or abbreviated Change-Id | Ic0ff33 |
| 38 | |Full or abbreviated commit SHA-1 | d81b32ef |
| 39 | |Email address | user@example.com |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 40 | |Approval requirement | Code-Review>=+2, Verified=1 |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 41 | |============================================================= |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 42 | |
| 43 | |
| 44 | Search Operators |
| 45 | ---------------- |
| 46 | |
| 47 | Operators act as restrictions on the search. As more operators |
| 48 | are added to the same query string, they further restrict the |
monica.dionisio | 7dfa0d2 | 2010-08-27 11:46:33 -0300 | [diff] [blame] | 49 | returned results. Search can also be performed by typing only a |
| 50 | text with no operator. It will try to match a project name by |
| 51 | substring. |
| 52 | |
| 53 | E.g. Searching for just "gerrit is:starred" will try to match a |
| 54 | project name by "gerrit" as substring. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 55 | |
Shawn O. Pearce | 51e058f6 | 2010-07-19 10:30:37 -0700 | [diff] [blame] | 56 | [[age]] |
| 57 | age:'AGE':: |
| 58 | + |
| 59 | Amount of time that has expired since the change was last updated |
| 60 | with a review comment or new patch set. The age must be specified |
| 61 | to include a unit suffix, for example `age:2d`: |
| 62 | + |
| 63 | * s, sec, second, seconds |
| 64 | * m, min, minute, minutes |
| 65 | * h, hr, hour, hours |
| 66 | * d, day, days |
| 67 | * w, week, weeks (`1 week` is treated as `7 days`) |
| 68 | * mon, month, months (`1 month` is treated as `30 days`) |
| 69 | * y, year, years (`1 year` is treated as `365 days`) |
| 70 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 71 | [[change]] |
| 72 | change:'ID':: |
| 73 | + |
| 74 | Either a legacy numerical 'ID' such as 15183, or a newer style |
| 75 | Change-Id that was scraped out of the commit message. |
| 76 | |
| 77 | [[owner]] |
| 78 | owner:'USER':: |
| 79 | + |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 80 | Changes originally submitted by 'USER'. The special case of |
| 81 | `owner:self` will find changes owned by the caller. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 82 | |
Martin Fick | bcb5b9b | 2011-01-13 13:16:20 -0700 | [diff] [blame] | 83 | [[ownerin]] |
| 84 | ownerin:'GROUP':: |
| 85 | + |
| 86 | Changes originally submitted by a user in 'GROUP'. |
| 87 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 88 | [[reviewer]] |
| 89 | reviewer:'USER':: |
| 90 | + |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 91 | Changes that have been, or need to be, reviewed by 'USER'. The |
| 92 | special case of `reviewer:self` will find changes where the caller |
| 93 | has been added as a reviewer. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 94 | |
Martin Fick | bcb5b9b | 2011-01-13 13:16:20 -0700 | [diff] [blame] | 95 | [[reviewerin]] |
| 96 | reviewerin:'GROUP':: |
| 97 | + |
| 98 | Changes that have been, or need to be, reviewed by a user in 'GROUP'. |
| 99 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 100 | [[commit]] |
| 101 | commit:'SHA1':: |
| 102 | + |
| 103 | Changes where 'SHA1' is one of the patch sets of the change. |
| 104 | |
| 105 | [[project]] |
| 106 | project:'PROJECT':: |
| 107 | + |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 108 | Changes occurring in 'PROJECT'. If 'PROJECT' starts with `^` it |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 109 | matches project names by regular expression. The |
| 110 | link:http://www.brics.dk/automaton/[dk.brics.automaton |
| 111 | library] is used for evaluation of such patterns. |
| 112 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 113 | [[branch]] |
| 114 | branch:'BRANCH':: |
| 115 | + |
Edwin Kempin | ad921cd | 2012-03-27 16:00:56 +0200 | [diff] [blame] | 116 | Changes for 'BRANCH'. The branch name is either the short name shown |
| 117 | in the web interface or the full name of the destination branch with |
| 118 | the traditional 'refs/heads/' prefix. |
Shawn O. Pearce | 082ed41 | 2010-08-28 12:38:32 -0700 | [diff] [blame] | 119 | + |
| 120 | If 'BRANCH' starts with `^` it matches branch names by regular |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 121 | expression patterns. The |
| 122 | link:http://www.brics.dk/automaton/[dk.brics.automaton |
| 123 | library] is used for evaluation of such patterns. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 124 | |
| 125 | [[topic]] |
| 126 | topic:'TOPIC':: |
| 127 | + |
| 128 | Changes whose designated topic at upload was 'TOPIC'. This is |
| 129 | often combined with 'branch:' and 'project:' operators to select |
| 130 | all related changes in a series. |
Shawn O. Pearce | 082ed41 | 2010-08-28 12:38:32 -0700 | [diff] [blame] | 131 | + |
| 132 | If 'TOPIC' starts with `^` it matches topic names by regular |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 133 | expression patterns. The |
| 134 | link:http://www.brics.dk/automaton/[dk.brics.automaton |
| 135 | library] is used for evaluation of such patterns. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 136 | |
| 137 | [[ref]] |
| 138 | ref:'REF':: |
| 139 | + |
| 140 | Changes where the destination branch is exactly the given 'REF' |
| 141 | name. Since 'REF' is absolute from the top of the repository it |
| 142 | must start with 'refs/'. |
Shawn O. Pearce | 082ed41 | 2010-08-28 12:38:32 -0700 | [diff] [blame] | 143 | + |
| 144 | If 'REF' starts with `^` it matches reference names by regular |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 145 | expression patterns. The |
| 146 | link:http://www.brics.dk/automaton/[dk.brics.automaton |
| 147 | library] is used for evaluation of such patterns. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 148 | |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 149 | [[tr,bug]] |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 150 | tr:'ID', bug:'ID':: |
| 151 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 152 | Search for changes whose commit message contains 'ID' and matches |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 153 | one or more of the |
| 154 | link:config-gerrit.html#trackingid[trackingid sections] |
| 155 | in the server's configuration file. This is typically used to |
| 156 | search for changes that fix a bug or defect by the issue tracking |
| 157 | system's issue identifier. |
| 158 | |
| 159 | [[label]] |
| 160 | label:'VALUE':: |
| 161 | + |
| 162 | Matches changes where the approval score 'VALUE' has been set during |
| 163 | a review. See <<labels,labels>> below for more detail on the format |
| 164 | of the argument. |
| 165 | |
monica.dionisio | 70a7ca0 | 2010-08-25 14:46:13 -0300 | [diff] [blame] | 166 | [[message]] |
| 167 | message:'MESSAGE':: |
| 168 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 169 | Changes that match 'MESSAGE' arbitrary string in the commit message body. |
monica.dionisio | 70a7ca0 | 2010-08-25 14:46:13 -0300 | [diff] [blame] | 170 | |
Shawn Pearce | 3ffbd1b | 2013-09-13 14:11:07 -0700 | [diff] [blame] | 171 | [[comment]] |
| 172 | comment:'TEXT':: |
| 173 | + |
| 174 | Changes that match 'TEXT' string in any comment left by a reviewer. |
| 175 | |
Shawn O. Pearce | 50756b9 | 2010-07-19 17:58:25 -0700 | [diff] [blame] | 176 | [[file]] |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 177 | file:^'REGEX':: |
Shawn O. Pearce | 50756b9 | 2010-07-19 17:58:25 -0700 | [diff] [blame] | 178 | + |
| 179 | Matches any change where REGEX matches a file that was affected |
| 180 | by the change. The regular expression pattern must start with |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 181 | `^`. For example, to match all XML files use `file:^.*\.xml$`. |
Magnus Bäck | e561183 | 2011-02-02 08:57:15 +0100 | [diff] [blame] | 182 | The link:http://www.brics.dk/automaton/[dk.brics.automaton |
| 183 | library] is used for the evaluation of such patterns. |
rafael.rabelosilva | aa5bca7 | 2010-08-26 11:04:53 +0200 | [diff] [blame] | 184 | + |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 185 | The `^` required at the beginning of the regular expression not only |
rafael.rabelosilva | aa5bca7 | 2010-08-26 11:04:53 +0200 | [diff] [blame] | 186 | denotes a regular expression, but it also has the usual meaning of |
| 187 | anchoring the match to the start of the string. To match all Java |
| 188 | files, use `file:^.*\.java`. |
| 189 | + |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 190 | The entire regular expression pattern, including the `^` character, |
rafael.rabelosilva | aa5bca7 | 2010-08-26 11:04:53 +0200 | [diff] [blame] | 191 | should be double quoted when using more complex construction (like |
| 192 | ones using a bracket expression). For example, to match all XML |
| 193 | files named like 'name1.xml', 'name2.xml', and 'name3.xml' use |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 194 | `file:"^name[1-3].xml"`. |
Shawn O. Pearce | 50756b9 | 2010-07-19 17:58:25 -0700 | [diff] [blame] | 195 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 196 | [[has]] |
| 197 | has:draft:: |
| 198 | + |
| 199 | True if there is a draft comment saved by the current user. |
| 200 | |
| 201 | has:star:: |
| 202 | + |
| 203 | Same as 'is:starred', true if the change has been starred by the |
| 204 | current user. |
| 205 | |
| 206 | [[is]] |
| 207 | is:starred:: |
| 208 | + |
| 209 | Same as 'has:star', true if the change has been starred by the |
| 210 | current user. |
| 211 | |
| 212 | is:watched:: |
| 213 | + |
| 214 | True if this change matches one of the current user's watch filters, |
| 215 | and thus is likely to notify the user when it updates. |
| 216 | |
| 217 | is:reviewed:: |
| 218 | + |
| 219 | True if there is at least one non-zero score on the change, in any |
| 220 | approval category, by any user. |
| 221 | |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 222 | is:owner:: |
| 223 | + |
| 224 | True on any change where the current user is the change owner. |
| 225 | Same as `owner:self`. |
| 226 | |
| 227 | is:reviewer:: |
| 228 | + |
| 229 | True on any change where the current user is a reviewer. |
| 230 | Same as `reviewer:self`. |
| 231 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 232 | is:open:: |
| 233 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 234 | True if the change is either open or submitted, merge pending. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 235 | |
Deniz Türkoglu | d6799b1d | 2012-05-10 11:20:56 -0700 | [diff] [blame] | 236 | is:draft:: |
| 237 | + |
| 238 | True if the change is a draft. |
| 239 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 240 | is:closed:: |
| 241 | + |
| 242 | True if the change is either merged or abandoned. |
| 243 | |
| 244 | is:submitted, is:merged, is:abandoned:: |
| 245 | + |
| 246 | Same as <<status,status:'STATE'>>. |
| 247 | |
| 248 | [[status]] |
| 249 | status:open:: |
| 250 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 251 | True if the change state is either 'review in progress' or 'submitted, |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 252 | merge pending'. |
| 253 | |
| 254 | status:reviewed:: |
| 255 | + |
| 256 | Same as 'is:reviewed', matches if there is at least one non-zero |
| 257 | score on the change, in any approval category, by any user. |
| 258 | |
| 259 | status:submitted:: |
| 260 | + |
| 261 | Change has been submitted, but is waiting for a dependency. |
| 262 | |
| 263 | status:closed:: |
| 264 | + |
| 265 | True if the change is either 'merged' or 'abandoned'. |
| 266 | |
| 267 | status:merged:: |
| 268 | + |
| 269 | Change has been merged into the branch. |
| 270 | |
| 271 | status:abandoned:: |
| 272 | + |
Edwin Kempin | 4c903b8 | 2012-06-13 16:06:07 +0200 | [diff] [blame] | 273 | Change has been abandoned. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 274 | |
| 275 | |
Shawn O. Pearce | 757df06 | 2012-11-30 11:20:37 -0800 | [diff] [blame] | 276 | Argument Quoting |
| 277 | ---------------- |
| 278 | |
| 279 | Operator values that are not bare words (roughly A-Z, a-z, 0-9, @, |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 280 | hyphen, dot and underscore) must be quoted for the query parser. |
Shawn O. Pearce | 757df06 | 2012-11-30 11:20:37 -0800 | [diff] [blame] | 281 | |
| 282 | Quoting is accepted as either double quotes |
| 283 | (e.g. `message:"the value"`) or as matched |
| 284 | curly braces (e.g. `message:{the value}`). |
| 285 | |
| 286 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 287 | Boolean Operators |
| 288 | ----------------- |
| 289 | |
| 290 | Unless otherwise specified, operators are joined using the `AND` |
| 291 | boolean operator, thereby restricting the search results. |
| 292 | |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 293 | Parentheses can be used to force a particular precedence on complex |
| 294 | operator expressions, otherwise OR has higher precedence than AND. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 295 | |
| 296 | Negation |
| 297 | ~~~~~~~~ |
| 298 | Any operator can be negated by prefixing it with `-`, for example |
| 299 | `-is:starred` is the exact opposite of `is:starred` and will |
| 300 | therefore return changes that are *not* starred by the current user. |
| 301 | |
| 302 | The operator `NOT` (in all caps) is a synonym. |
| 303 | |
| 304 | AND |
| 305 | ~~~ |
| 306 | The boolean operator `AND` (in all caps) can be used to join two |
| 307 | other operators together. This results in a restriction of the |
| 308 | results, returning only changes that match both operators. |
| 309 | |
| 310 | OR |
| 311 | ~~ |
| 312 | The boolean operator `OR` (in all caps) can be used to find changes |
David Pursehouse | 9246356 | 2013-06-24 10:16:28 +0900 | [diff] [blame] | 313 | that match either operator. This increases the number of results |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 314 | that are returned, as more changes are considered. |
| 315 | |
| 316 | |
| 317 | [[labels]] |
| 318 | Labels |
| 319 | ------ |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 320 | Label operators can be used to match approval scores given during |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 321 | a code review. The specific set of supported labels depends on |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 322 | the server configuration, however `Code-Review` and `Verified` |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 323 | are the default labels provided out of the box. |
| 324 | |
| 325 | A label name is any of the following: |
| 326 | |
Dave Borowitz | 01c1b1f | 2013-02-27 13:49:04 -0800 | [diff] [blame] | 327 | * The label name. Example: `label:Code-Review`. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 328 | |
| 329 | * The one or two character abbreviation shown in the column header |
| 330 | of change list pages. Example: `label:R` or `label:V`. |
| 331 | |
Craig Chapel | 9c6e537 | 2013-02-13 10:14:08 -0700 | [diff] [blame] | 332 | * The label name followed by a ',' followed by a reviewer id or a |
| 333 | group id. To make it clear whether a user or group is being looked |
| 334 | for, precede the value by a user or group argument identifier |
| 335 | ('user=' or 'group='). If an LDAP group is being referenced make |
| 336 | sure to use 'ldap/<groupname>'. |
| 337 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 338 | A label name must be followed by a score, or an operator and a score. |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 339 | The easiest way to explain this is by example. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 340 | |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 341 | `label:Code-Review=2`:: |
| 342 | `label:Code-Review=+2`:: |
| 343 | `label:Code-Review+2`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 344 | + |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 345 | Matches changes where there is at least one +2 score for Code-Review. |
Edwin Kempin | cdb0e00 | 2011-09-08 14:23:30 +0200 | [diff] [blame] | 346 | The + prefix is optional for positive score values. If the + is used, |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 347 | the = operator is optional. |
| 348 | |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 349 | `label:Code-Review=-2`:: |
| 350 | `label:Code-Review-2`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 351 | + |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 352 | Matches changes where there is at least one -2 score for Code-Review. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 353 | Because the negative sign is required, the = operator is optional. |
| 354 | |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 355 | `label:Code-Review=1`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 356 | + |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 357 | Matches changes where there is at least one +1 score for Code-Review. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 358 | Scores of +2 are not matched, even though they are higher. |
| 359 | |
Dave Borowitz | 41f909f | 2013-02-05 15:34:18 -0800 | [diff] [blame] | 360 | `label:Code-Review>=1`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 361 | + |
| 362 | Matches changes with either a +1, +2, or any higher score. |
| 363 | |
Craig Chapel | 9c6e537 | 2013-02-13 10:14:08 -0700 | [diff] [blame] | 364 | `label:CodeReview=+2,aname`:: |
| 365 | + |
| 366 | Matches changes with a +2 code review where the reviewer or group is aname. |
| 367 | |
| 368 | `label:CodeReview=2,user=jsmith`:: |
| 369 | + |
| 370 | Matches changes with a +2 code review where the reviewer is jsmith. |
| 371 | |
| 372 | `label:CodeReview=+1,group=ldap/linux.workflow`:: |
| 373 | + |
| 374 | Matches changes with a +1 code review where the reviewer is in the |
| 375 | ldap/linux.workflow group. |
| 376 | |
| 377 | `label:CodeReview<=-1`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 378 | + |
| 379 | Matches changes with either a -1, -2, or any lower score. |
| 380 | |
David Pursehouse | 48933d3 | 2013-09-26 15:21:47 +0900 | [diff] [blame] | 381 | `is:open label:Code-Review+2 label:Verified+1 NOT label:Verified-1 NOT label:Code-Review-2`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 382 | + |
| 383 | Matches changes that are ready to be submitted. |
| 384 | |
David Pursehouse | 48933d3 | 2013-09-26 15:21:47 +0900 | [diff] [blame] | 385 | `is:open (label:Verified-1 OR label:Code-Review-2)`:: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 386 | + |
| 387 | Changes that are blocked from submission due to a blocking score. |
| 388 | |
| 389 | |
| 390 | Magical Operators |
| 391 | ----------------- |
| 392 | |
| 393 | Most of these operators exist to support features of Gerrit Code |
| 394 | Review, and are not meant to be accessed by the average end-user. |
| 395 | However, they are recognized by the query parser, and may prove |
| 396 | useful in limited contexts to administrators or power-users. |
| 397 | |
| 398 | visibleto:'USER-or-GROUP':: |
| 399 | + |
| 400 | Matches changes that are visible to 'USER' or to anyone who is a |
| 401 | member of 'GROUP'. Here group names may be specified as either |
| 402 | an internal group name, or if LDAP is being used, an external LDAP |
| 403 | group name. The value may be wrapped in double quotes to include |
| 404 | spaces or other special characters. For example, to match an LDAP |
| 405 | group: `visibleto:"CN=Developers, DC=example, DC=com"`. |
| 406 | + |
| 407 | This operator may be useful to test access control rules, however a |
| 408 | change can only be matched if both the current user and the supplied |
| 409 | user or group can see it. This is due to the implicit 'is:visible' |
| 410 | clause that is always added by the server. |
| 411 | |
| 412 | is:visible:: |
| 413 | + |
| 414 | Magical internal flag to prove the current user has access to read |
| 415 | the change. This flag is always added to any query. |
| 416 | |
| 417 | starredby:'USER':: |
| 418 | + |
Edwin Kempin | 8de47ac | 2011-02-28 10:30:46 +0100 | [diff] [blame] | 419 | Matches changes that have been starred by 'USER'. |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 420 | The special case `starredby:self` applies to the caller. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 421 | |
| 422 | watchedby:'USER':: |
| 423 | + |
| 424 | Matches changes that 'USER' has configured watch filters for. |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 425 | The special case `watchedby:self` applies to the caller. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 426 | |
| 427 | draftby:'USER':: |
| 428 | + |
David Pursehouse | 221d4f6 | 2012-06-08 17:38:08 +0900 | [diff] [blame] | 429 | Matches changes that 'USER' has left unpublished draft comments on. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 430 | Since the drafts are unpublished, it is not possible to see the |
Shawn O. Pearce | 068a0d8 | 2012-04-07 14:59:11 -0700 | [diff] [blame] | 431 | draft text, or even how many drafts there are. The special case |
| 432 | of `draftby:self` will find changes where the caller has created |
| 433 | a draft comment. |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 434 | |
| 435 | limit:'CNT':: |
| 436 | + |
| 437 | Limit the returned results to no more than 'CNT' records. This is |
| 438 | automatically set to the page size configured in the current user's |
| 439 | preferences. Including it in a web query may lead to unpredictable |
| 440 | results with regards to pagination. |
| 441 | |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 442 | resume_sortkey:'KEY':: |
Shawn O. Pearce | 14760b7 | 2010-07-19 09:44:46 -0700 | [diff] [blame] | 443 | + |
| 444 | Positions the low level scan routine to start from 'KEY' and |
| 445 | continue through changes from this point. This is most often used |
| 446 | for paginating result sets. Including this in a web query may lead |
| 447 | to unpredictable results. |
| 448 | |
Karsten Dambekalns | a7f72a2 | 2011-03-25 14:21:59 +0100 | [diff] [blame] | 449 | sortkey_after:'KEY', sortkey_before:'KEY':: |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 450 | + |
| 451 | Restart the low level scan routine from 'KEY'. This is automatically |
| 452 | set by the pagination system as the user navigates through results |
| 453 | of a query. Including either value in a web query may lead to |
| 454 | unpredictable results. |
| 455 | |
Shawn O. Pearce | 757df06 | 2012-11-30 11:20:37 -0800 | [diff] [blame] | 456 | |
Shawn O. Pearce | 51d008d | 2010-07-16 18:34:31 -0700 | [diff] [blame] | 457 | GERRIT |
| 458 | ------ |
| 459 | Part of link:index.html[Gerrit Code Review] |