diff --git a/Documentation/cmd-stream-events.txt b/Documentation/cmd-stream-events.txt index e8c5213e8f..f0ad460380 100644 --- a/Documentation/cmd-stream-events.txt +++ b/Documentation/cmd-stream-events.txt @@ -234,6 +234,8 @@ patchSet:: link:json.html#patchSet[patchSet attribute] reviewer:: link:json.html#account[account attribute] +adder:: user that added the reviewer as link:json.html#account[account attribute] + eventCreatedOn:: Time in seconds since the UNIX epoch when this event was created. diff --git a/java/com/google/gerrit/server/events/ReviewerAddedEvent.java b/java/com/google/gerrit/server/events/ReviewerAddedEvent.java index 9644456d4f..ea6bda3e74 100644 --- a/java/com/google/gerrit/server/events/ReviewerAddedEvent.java +++ b/java/com/google/gerrit/server/events/ReviewerAddedEvent.java @@ -21,6 +21,7 @@ import com.google.gerrit.server.data.AccountAttribute; public class ReviewerAddedEvent extends PatchSetEvent { static final String TYPE = "reviewer-added"; public Supplier reviewer; + public Supplier adder; public ReviewerAddedEvent(Change change) { super(TYPE, change); diff --git a/java/com/google/gerrit/server/events/StreamEventsApiListener.java b/java/com/google/gerrit/server/events/StreamEventsApiListener.java index 3add4cac13..5b2c368ae8 100644 --- a/java/com/google/gerrit/server/events/StreamEventsApiListener.java +++ b/java/com/google/gerrit/server/events/StreamEventsApiListener.java @@ -317,6 +317,7 @@ public class StreamEventsApiListener event.change = changeAttributeSupplier(change, notes); event.patchSet = patchSetAttributeSupplier(change, psUtil.current(notes)); + event.adder = accountAttributeSupplier(ev.getWho()); for (AccountInfo reviewer : ev.getReviewers()) { event.reviewer = accountAttributeSupplier(reviewer); dispatcher.run(d -> d.postEvent(event));