gerrit/Documentation/user-named-destinations.txt
Martin Fick 563a3e6a8f Add named destinations support
A destination is a project/ref combination.  This change adds a
mechanism for users to categorize (i.e. tag, label, name...)
destinations.  Gerrit has hashtags to categorize changes, and groups to
categorize accounts.  Named destinations categorize project/ref
combinations.  They make it possible to assign a name to sets of
destinations.  Naming sets of destinations makes it easier to reference
them since you can just use a single name instead of enumerating the
whole set.  Easier referencing can eventually make it easier to define
policies on sets of destinations (and to ensure that different
tools/users are using the same sets).  This feature can be used to
allows users to define personal sets of destinations that interest them,
perhaps destinations that they would like to watch, or review, and it
may eventually allow them to share those sets with other users (not with
this change, that is a follow on feature).

This change makes it possible to search for changes based on those named
destinations.  Eventually it might make sense to be able to apply ACLs
on named destinations, but this change does not attempt to do that.
Named destinations are currently defined at the user level.  This change
parses user destinations named after files in the "destinations"
directory in the user's ref in the All-Users project.  The
"destinations" file format is a simple text file with two tab separated
columns: REF and PROJECT.  The named destinations are accessible via the
new "destination" operator: 'destination:<name>'

Change-Id: I41e65b10c98d4761b83e14c5e5e9698b64a9eec9
2015-09-03 10:50:07 -06:00

33 lines
1.1 KiB
Plaintext

= Gerrit Code Review - Named Destinations
[[user-named-destinations]]
== User Named Destinations
It is possible to define named destination sets on a user level.
To do this, define the named destination sets in files named after
each destination set in the `destinations` directory 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 destination files are a 2 column tab delimited file. Each
row in a destination file represents a single destination in the
named set. The left column represents the ref of the destination,
and the right column represents the project of the destination.
Example destination file named `destinations/myreviews`:
----
# Ref Project
#
refs/heads/master gerrit
refs/heads/stable-2.11 gerrit
refs/heads/master plugins/cookbook-plugin
----
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------