gerrit/Documentation/user-named-queries.txt
Martin Fick 5e5a36f736 Add custom user named query support
This parses user queries from the "queries" file in the user's ref in
the All-Users project.  The "queries" file format is a simple text file
with two tab separated columns: NAME and QUERY.  The named queries are
accessible via the new query:<name> operator.

Change-Id: I1dd12230fe7488164ae1711c6c2fd22ebcd14166
2015-05-08 18:06:50 -06:00

33 lines
1.0 KiB
Plaintext

= Gerrit Code Review - Named Queries
[[user-named-queries]]
== User Named Queries
It is possible to define named queries on a user level. To do
this, define the named queries in the `queries` file of
the user's account ref in the `All-Users` project. The user's
account ref is based on the user's account id which is an
integer. The account refs are sharded by the last two digits
(`+nn+`) in the refname, leading to refs of the format
`+refs/users/nn/accountid+`. The user's queries file is a
2 column tab delimited file. The left column represents the
name of the query, and the right column represents the query
expression represented by the name.
Example queries file:
----
# Name Query
#
selfapproved owner:self label:code-review+2,user=self
blocked label:code-review-2 OR label:verified-1
# Note below how to reference your own named queries in other named queries
ready label:code-review+2 label:verified+1 -query:blocked status:open
----
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------