Files
gerrit/java
Gal Paikin 90add1fe5d Adding and removing reviewers adds/removes them to/from the attention set
This change is another part of the chain to add defaults for adding or
removing users as reviewers. This change ensures that each time reviewers
are added or removed in any way, the attention set will also be updated
accordingly.

One edge case is the situation of a change that is work in progress, and
in which case the attention set will not be touched, since it should be
empty by default at all times, until it gets out the work in progress
state.

Also, it is possible to mark a change as work in progress while adding a
reviewer. In this case it's important to ensure that nobody is added to
the attention set.

CCs are treated as "REMOVED" for the sake of attention set. They are not
reviewers, and should not be in the attention set.

As a follow-up change, when a change becomes "ready for review" instead
of work in progress, all reviewers will be added to the attention set.

Also, users will currently be added to the attention set when they post
a reply, because they are added as reviewers at that time. This is not
the behavior that we really want cause when users reply, they should be
removed from the attention set. This will be fixed when working on the
PostReview endpoint.

In ChangeUpdate, we only needed to adjust "reviewers" and not the other
field that adds reviewers "reviewersByEmail" since according to one
of the tests, reviewers that are added by email are still going to
be a part of the reviewers field, as long as they are registered
within Gerrit. Users that are not registered in Gerrit should not
be added to the attention set (hence reviewersByEmail field is not
touched).

Change-Id: I18300c06bb20d1236153d57bd90f28422d14ce9d
2020-06-18 14:43:29 +03:00
..