Merge branch 'stable-3.0' into stable-3.1
* stable-3.0: Set version to 3.0.5-SNAPSHOT Set version to 3.0.4 ReviewerAddedEvent: extend event with 'adder' Post/Delete GPG keys: Remove incorrect comments Change-Id: I4c19ac3df0e113aac3fb98eb6edc1cac47910126
This commit is contained in:
@@ -234,6 +234,8 @@ patchSet:: link:json.html#patchSet[patchSet attribute]
|
|||||||
|
|
||||||
reviewer:: link:json.html#account[account 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
|
eventCreatedOn:: Time in seconds since the UNIX epoch when this event was
|
||||||
created.
|
created.
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ public class DeleteGpgKey implements RestModifyView<GpgKey, Input> {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LOCK_FAILURE:
|
case LOCK_FAILURE:
|
||||||
// should not happen since this case is already handled by PublicKeyStore#save
|
|
||||||
case FORCED:
|
case FORCED:
|
||||||
case IO_FAILURE:
|
case IO_FAILURE:
|
||||||
case NEW:
|
case NEW:
|
||||||
|
|||||||
@@ -275,7 +275,6 @@ public class PostGpgKeys implements RestModifyView<AccountResource, GpgKeysInput
|
|||||||
case NO_CHANGE:
|
case NO_CHANGE:
|
||||||
break;
|
break;
|
||||||
case LOCK_FAILURE:
|
case LOCK_FAILURE:
|
||||||
// should not happen since this case is already handled by PublicKeyStore#save
|
|
||||||
case IO_FAILURE:
|
case IO_FAILURE:
|
||||||
case NOT_ATTEMPTED:
|
case NOT_ATTEMPTED:
|
||||||
case REJECTED:
|
case REJECTED:
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.google.gerrit.server.data.AccountAttribute;
|
|||||||
public class ReviewerAddedEvent extends PatchSetEvent {
|
public class ReviewerAddedEvent extends PatchSetEvent {
|
||||||
static final String TYPE = "reviewer-added";
|
static final String TYPE = "reviewer-added";
|
||||||
public Supplier<AccountAttribute> reviewer;
|
public Supplier<AccountAttribute> reviewer;
|
||||||
|
public Supplier<AccountAttribute> adder;
|
||||||
|
|
||||||
public ReviewerAddedEvent(Change change) {
|
public ReviewerAddedEvent(Change change) {
|
||||||
super(TYPE, change);
|
super(TYPE, change);
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ public class StreamEventsApiListener
|
|||||||
|
|
||||||
event.change = changeAttributeSupplier(change, notes);
|
event.change = changeAttributeSupplier(change, notes);
|
||||||
event.patchSet = patchSetAttributeSupplier(change, psUtil.current(notes));
|
event.patchSet = patchSetAttributeSupplier(change, psUtil.current(notes));
|
||||||
|
event.adder = accountAttributeSupplier(ev.getWho());
|
||||||
for (AccountInfo reviewer : ev.getReviewers()) {
|
for (AccountInfo reviewer : ev.getReviewers()) {
|
||||||
event.reviewer = accountAttributeSupplier(reviewer);
|
event.reviewer = accountAttributeSupplier(reviewer);
|
||||||
dispatcher.run(d -> d.postEvent(event));
|
dispatcher.run(d -> d.postEvent(event));
|
||||||
|
|||||||
Reference in New Issue
Block a user