gerrit/Documentation/dev-stars.txt
Edwin Kempin 614f983a71 Replace Mute/Unmute by Mark as Reviewed/Unreviewed (Part 3)
Remove the Mute/Unmute functionality, it is replaced by the new
MarkAsReviewed/MarkAsUnreviewed REST endpoints (added by predecessor
change).

A schema migration takes care to rename existing mute labels. Since
the star labels are also stored in the change index the affected
changes must be reindexed. Since we can't reindex changes from a
schema migration a new change schema version is added which enforces a
reindex of all changes on upgrade to the new index version (either by
online or offline reindex).

The mute functionality was added by change I83085033f which is not
part of any release yet. Hence we can still change the API for this
without breaking backwards compatibility.

Since the 'mute' namespace is now free again we may use this name
later to implement functionality which is similar to Gmail's mute.
E.g. remove the change from the dashboard until a new patch is
uploaded.

The muted() method is removed from the extension API since the
information whether a change is reviewed or not is already provided as
part of ChangeInfo (see "reviewed" field). This method was anyway bad
since this functionality didn't exist as REST endpoint and the
extension API is normally only a wrapper around the REST API.

The 'mute' field from ChangeInfo is removed since it wasn't used on
client-side. The client rather relied on the "reviewed" field to
highlight changes in dashboards.

Bug: Issue 7237
Change-Id: Ia21e6031908dd0c722f3839ab186724043b460d3
Signed-off-by: Edwin Kempin <ekempin@google.com>
2017-10-01 12:38:18 +00:00

111 lines
3.4 KiB
Plaintext

= Gerrit Code Review - Stars
== Description
Changes can be starred with labels that behave like private hashtags.
Any label can be applied to a change, but these labels are only visible
to the user for which the labels have been set.
Stars allow users to categorize changes by self-defined criteria and
then build link:user-dashboards.html[dashboards] for them by making use
of the link:#query-stars[star query operators].
[[star-api]]
== Star API
The link:rest-api-accounts.html#star-endpoints[star REST API] supports:
* link:rest-api-accounts.html#get-stars[
get star labels from a change]
* link:rest-api-accounts.html#set-stars[
update star labels on a change]
* link:rest-api-accounts.html#get-starred-changes[
list changes that are starred by any label]
Star labels are also included in
link:rest-api-changes.html#change-info[ChangeInfo] entities that are
returned by the link:rest-api-changes.html[changes REST API].
There are link:rest-api-accounts.html#default-star-endpoints[
additional REST endpoints] for the link:#default-star[default star].
Only the link:#default-star[default star] is shown in the WebUI and
can be updated from there. Other stars do not show up in the WebUI.
[[default-star]]
== Default Star
If the default star is set by a user, this user is automatically
notified by email whenever updates are made to that change.
The default star is the star that is shown in the WebUI and which can
be updated from there.
The default star is represented by the special star label 'star'.
[[ignore-star]]
== Ignore Star
If the ignore star is set by a user, this user gets no email
notifications for updates of that change, even if this user is a
reviewer of the change or the change is matched by a project watch of
the user.
Since changes can only be ignored once they are created, users that
watch a project will always get the email notifications for the change
creation. Only then the change can be ignored.
Users that are added as reviewer or assignee to a change that they have
ignored will be notified about this, so that they know about the review
request. They can then decide to remove the ignore star.
The ignore star is represented by the special star label 'ignore'.
[[reviewed-star]]
== Reviewed Star
If the "reviewed/<patchset_id>"-star is set by a user, and <patchset_id>
matches the current patch set, the change is always reported as "reviewed"
in the ChangeInfo.
This allows users to "de-highlight" changes in a dashboard until a new
patchset has been uploaded.
[[unreviewed-star]]
== Unreviewed Star
If the "unreviewed/<patchset_id>"-star is set by a user, and <patchset_id>
matches the current patch set, the change is always reported as "unreviewed"
in the ChangeInfo.
This allows users to "highlight" changes in a dashboard.
[[query-stars]]
== Query Stars
There are several query operators to find changes with stars:
* link:user-search.html#star[star:<LABEL>]:
Matches any change that was starred by the current user with the
label `<LABEL>`.
* link:user-search.html#has-stars[has:stars]:
Matches any change that was starred by the current user with any
label.
* link:user-search.html#is-starred[is:starred] /
link:user-search.html#has-star[has:star]:
Matches any change that was starred by the current user with the
link:#default-star[default star].
[[syntax]]
== Syntax
Star labels cannot contain whitespace characters. All other characters
are allowed.
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------