commit | 55513bd75769928803b60b6bfd084ff9b5ceea0c | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Mon Feb 03 23:20:13 2020 +0000 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Mon Feb 03 23:20:13 2020 +0000 |
tree | 858320cfa8fd00a3073c1778903a510aed941d28 | |
parent | 6e82ab666e9e299d5a4264662d006b7f5c19f600 [diff] |
Add reviewers from OWNERS all at once Make a single invocation to the add reviewer action to a change for all the OWNERS that have to be assigned automatically. This avoids the spamming of the reviewers with multiple notifications, one per additional reviewer. Change-Id: I615e55d1f6c574016643be4820e2eb71e4c3643c
diff --git a/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java b/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java index 70c3e67..3335144 100644 --- a/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java +++ b/owners-autoassign/src/main/java/com/googlesource/gerrit/owners/common/ReviewerManager.java
@@ -86,8 +86,8 @@ account, changeInfo._number); } - gApi.changes().id(changeInfo.id).current().review(in); } + gApi.changes().id(changeInfo.id).current().review(in); } } catch (RestApiException | OrmException e) { log.error("Couldn't add reviewers to the change", e);