Add hasReviewStarted, pendingReviewers to Change
The introduction of the WIP property on changes gives us the ability to define a new concept: whether a change has started review. A change starts review as soon as its WIP property is set to false. Starting review is permanent; hasReviewStarted remains true even if the change returns to WIP. Review also starts immediately on any change that is not WIP at creation time. This makes it possible to suppress notifications on WIP changes according to whether notifications have previously been sent. Another two properties we can add now are pendingReviewers and pendingReviewersByEmail. These are the sets of reviewer mutations that have occurred since the change entered its current WIP phase. This is necessary so we can correctly address all modified reviewers in notifications when the change leaves WIP, and so PolyGerrit can indicate to the change owner which reviewers haven't been notified yet. The hasReviewStarted property is a simple boolean column in ReviewDb, and is derived by NoteDb from Work-in-progress footers. The pendingReviewers and pendingReviewersByEmail properties are only available when changes are read from NoteDb (they reset to empty when a change is read or rebuilt from ReviewDb). They are also derived from Work-in-progress footers. Changes that are ready for review have no pending reviewers. Pending reviewers are indexed, but we do not provide any new search operators for them at this time. Change-Id: I05c7a21b078e5b1a49940d16c1196c296cd3e25c
This commit is contained in:
@@ -5588,7 +5588,7 @@ Only set if link:#detailed-labels[detailed labels] are requested.
|
||||
The reviewers that can be removed by the calling user as a list of
|
||||
link:rest-api-accounts.html#account-info[AccountInfo] entities. +
|
||||
Only set if link:#detailed-labels[detailed labels] are requested.
|
||||
|`reviewers` ||
|
||||
|`reviewers` |optional|
|
||||
The reviewers as a map that maps a reviewer state to a list of
|
||||
link:rest-api-accounts.html#account-info[AccountInfo] entities.
|
||||
Possible reviewer states are `REVIEWER`, `CC` and `REMOVED`. +
|
||||
@@ -5597,6 +5597,12 @@ Possible reviewer states are `REVIEWER`, `CC` and `REMOVED`. +
|
||||
`REMOVED`: Users that were previously reviewers on the change, but have
|
||||
been removed. +
|
||||
Only set if link:#detailed-labels[detailed labels] are requested.
|
||||
|`pending_reviewers` |optional|
|
||||
Updates to `reviewers` that have been made while the change was in the
|
||||
WIP state. Only present on WIP changes and only if there are pending
|
||||
reviewer updates to report. These are reviewers who have not yet been
|
||||
notified about being added to or removed from the change. +
|
||||
Only set if link:#detailed-labels[detailed labels] are requested.
|
||||
|`reviewer_updates`|optional|
|
||||
Updates to reviewers set for the change as
|
||||
link:#review-update-info[ReviewerUpdateInfo] entities.
|
||||
@@ -5626,6 +5632,8 @@ problems with this change. Only set if link:#check[CHECK] is set.
|
||||
When present, change is marked as private.
|
||||
|`work_in_progress` |optional, not set if `false`|
|
||||
When present, change is marked as Work In Progress.
|
||||
|`has_started_review` |optional, not set if `false`|
|
||||
When present, change has been marked Ready at some point in time.
|
||||
|==================================
|
||||
|
||||
[[change-input]]
|
||||
|
||||
Reference in New Issue
Block a user