9e972ccb44
At the moment Gerrit supports only one kind of star on changes, either a change is starred by a user or it is not. For some use cases users want to put different stars on changes. E.g. issue 1144 requests colored stars (yellow, red, blue) and issue 2576 requests an ignore star. Star labels behave like private hashtags. A user can apply any label to a change, but these labels are only visible to that user. Having support for stars allows us to implement a first working version of the ReviewIt Gerrit Android application. To support star labels the API of StarredChangesUtil is extended so that it can read/store star labels. Star labels are stored in the change index. This is needed to be able to return the star labels as part of ChangeInfo without needing to scan for them. Including the star labels into ChangeInfo is done in a follow-up change so that a online migration is possible, where search results don't need to read from git: 1. The star labels are stored in the index, changes retured as query results do not contain star labels (this change). 2. Run online schema migration, when finished the index contains the new STAR field for all changes. 3. Include the star labels into ChangeInfo, access to git is not needed since the star labels are read from the index (next change). Also the STAR field in the index enables a new search operator for star labels ("star:<label>") that finds changes that have been starred by the current user with the given label The STARREDBY field and the IsStarredByPredicate will be no longer needed since the 'is:starred' query that they serve can be implemented by using the new STAR field and the new StarPredicate. This is why the STARREDBY field is and the IsStarredByPredicate predicate are deprecated. In addition a STARBY field is added to the index that tracks all users that have starred the change with any label. This field is needed to be able to list all starred changes (changes that have at least one star by the user). Without this field we would need to scan the full refs/starred-changes/ namespace for this. The STARBY field also backs a new 'has:stars' query operator which finds all changes that have at least one star by the current user. The REST API is extended so that users can get/add/remove star labels. New REST endpoints have been added to - get star labels from a change GET /accounts/<account-id>/stars.changes/<change-id> - update star labels on a change POST /accounts/<account-id>/stars.changes/<change-id> - list changes that are starred by any label GET /accounts/<account-id>/stars.changes/ The REST endpoints that deal with the default stars are left unmodified for backwards compatibility. They are exposed under '/accounts/<id>/starred.changes/'. Star labels are private to a user, hence a user can access only the own star labels. New methods have been added to the AccountApi to support get and update of star labels, and listing of changes that have been starred with any label. Star labels also affect the ETag of a change. Instead of including the actual labels into the ETag computation we simply use the ID of the object in which the labels are stored in git. This way we don't need to read the blob for the ETag computation. The old method to retrieve starred changes from an IdentifiedUser and the way to load the starred changes asynchroniously is deprecated now. The asynchronous loading was needed when the starred changes were (slowly) loaded from the database, but the new lookup is faster so that we no longer need this asynchronous loading. The code for this is still kept so that we can still support IsStarredByLegacyPredicate which is needed to find starred changes when the change index doesn't contain the new star fields yet. Change-Id: I25d8af5a2a26930320c074225e26ff032889c891 Signed-off-by: Edwin Kempin <ekempin@google.com>
94 lines
3.5 KiB
Plaintext
94 lines
3.5 KiB
Plaintext
= Gerrit Code Review for Git
|
|
|
|
== Tutorial
|
|
. Getting started
|
|
.. link:intro-quick.html[A Quick Introduction to Gerrit]
|
|
.. link:intro-user.html[User Guide]
|
|
.. link:intro-project-owner.html[Project Owner Guide]
|
|
.. link:http://source.android.com/submit-patches/workflow[Default Android Workflow] (external)
|
|
. Web
|
|
.. link:user-review-ui.html[Reviewing Changes]
|
|
.. link:user-search.html[Searching Changes]
|
|
.. link:user-inline-edit.html[Manipulating Changes in Browser]
|
|
.. link:user-notify.html[Subscribing to Email Notifications]
|
|
. SSH
|
|
.. link:user-upload.html#ssh[SSH connection details]
|
|
.. link:cmd-index.html[Command Line Tools]
|
|
. Git
|
|
.. Commands, scenarios
|
|
... link:user-upload.html[Uploading Changes]
|
|
... link:error-messages.html[Error Messages]
|
|
.. Changes
|
|
... link:user-changeid.html[Change-Id Lines]
|
|
... link:user-signedoffby.html[Signed-off-by Lines]
|
|
... link:user-change-cleanup.html[Change Cleanup]
|
|
|
|
== Project Management
|
|
. link:project-configuration.html[Project Configuration]
|
|
.. link:config-labels.html[Review Labels]
|
|
.. link:config-project-config.html[Project Configuration File Format]
|
|
. link:access-control.html[Access Controls]
|
|
. Multi-project management
|
|
.. link:user-submodules.html[Submodules]
|
|
.. link:https://source.android.com/source/using-repo.html[Repo] (external)
|
|
. Prolog rules
|
|
.. link:prolog-cookbook.html[Prolog Cookbook]
|
|
.. link:prolog-change-facts.html[Prolog Facts for Gerrit Changes]
|
|
. link:user-submodules.html[Subscribing to Git Submodules]
|
|
. link:intro-project-owner.html#project-deletion[Project deletion]
|
|
|
|
== Customization and Integration
|
|
. link:user-dashboards.html[Dashboards]
|
|
. link:rest-api.html[REST API]
|
|
. link:config-gitweb.html[Gitweb Integration]
|
|
. link:config-themes.html[Themes]
|
|
. link:config-sso.html[Single Sign-On Systems]
|
|
. link:config-hooks.html[Hooks]
|
|
. link:config-mail.html[Mail Templates]
|
|
. link:config-cla.html[Contributor Agreements]
|
|
|
|
== Server Administration
|
|
. link:install.html[Installation Guide]
|
|
. link:config-gerrit.html[System Settings]
|
|
. link:cmd-index.html[Command Line Tools]
|
|
. link:config-plugins.html#replication[Replication]
|
|
. link:config-plugins.html[Plugins]
|
|
. link:config-reverseproxy.html[Reverse Proxy]
|
|
. link:config-auto-site-initialization.html[Automatic Site Initialization on Startup]
|
|
. link:pgm-index.html[Server Side Administrative Tools]
|
|
|
|
== Developer
|
|
. Getting Started
|
|
.. link:dev-readme.html[Developer Setup]
|
|
.. link:dev-eclipse.html[Eclipse Setup]
|
|
.. link:dev-buck.html[Building with Buck]
|
|
.. link:dev-contributing.html[Contributing to Gerrit]
|
|
. Plugin Development
|
|
.. link:dev-plugins.html[Developing Plugins]
|
|
.. link:dev-build-plugins.html[Building Gerrit plugins]
|
|
.. link:js-api.html[JavaScript Plugin API]
|
|
.. link:config-validation.html[Validation Interfaces]
|
|
.. link:dev-stars.html[Starring Changes]
|
|
. link:dev-design.html[System Design]
|
|
. link:i18n-readme.html[i18n Support]
|
|
|
|
== Maintainer
|
|
. link:dev-release.html[Making a Gerrit Release]
|
|
. link:dev-release-subproject.html[Making a Release of a Gerrit Subproject]
|
|
. link:dev-release-jgit.html[Making a Release of JGit]
|
|
|
|
== Resources
|
|
* link:licenses.html[Licenses and Notices]
|
|
* link:https://www.gerritcodereview.com/[Homepage]
|
|
* link:https://www.gerritcodereview.com/download/index.html[Downloads]
|
|
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking]
|
|
* link:https://gerrit.googlesource.com/gerrit[Source Code]
|
|
* link:https://www.gerritcodereview.com/about.md[A History of Gerrit Code Review]
|
|
|
|
GERRIT
|
|
------
|
|
Part of link:https://www.gerritcodereview.com/[Gerrit Code Review]
|
|
|
|
SEARCHBOX
|
|
---------
|