Merge branch 'stable-3.3' into stable-3.4
* stable-3.3:
Trigger owners-autoassign processing for change readyForReview
Fix matcher inheritance between OWNERS files
Allow adding reviewers in the OWNERS file
Don't use local disk in integration tests
Fix test module package name for owners-autoassign integration-tests
Change-Id: I6aa63e7de579a04a505e6f0e849e7f171f928666
diff --git a/owners-autoassign/src/test/java/com/googlesource/gerrit/owners/common/AbstractAutoassignIT.java b/owners-autoassign/src/test/java/com/googlesource/gerrit/owners/common/AbstractAutoassignIT.java
index 70d6728..e8fa11b 100644
--- a/owners-autoassign/src/test/java/com/googlesource/gerrit/owners/common/AbstractAutoassignIT.java
+++ b/owners-autoassign/src/test/java/com/googlesource/gerrit/owners/common/AbstractAutoassignIT.java
@@ -47,6 +47,24 @@
}
@Test
+ public void shouldAutoassignOneOwner() throws Exception {
+ String ownerEmail = user.email();
+
+ pushFactory
+ .create(
+ admin.newIdent(),
+ testRepo,
+ "Set OWNERS",
+ "OWNERS",
+ "inherited: false\n" + "owners:\n" + "- " + ownerEmail)
+ .to("refs/heads/master")
+ .assertOkStatus();
+
+ ChangeApi changeApi = change(createChange());
+ Collection<AccountInfo> reviewers = changeApi.get().reviewers.get(ReviewerState.REVIEWER);
+ }
+
+ @Test
public void shouldAutoassignUserInPath() throws Exception {
String ownerEmail = user.email();
diff --git a/owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java b/owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java
index 52e2b58..07c3dad 100644
--- a/owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java
+++ b/owners-common/src/main/java/com/googlesource/gerrit/owners/common/AccountsImpl.java
@@ -21,6 +21,7 @@
import com.google.gerrit.entities.Account;
import com.google.gerrit.entities.Account.Id;
import com.google.gerrit.entities.AccountGroup;
+import com.google.gerrit.entities.InternalGroup;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.account.AccountResolver;
@@ -28,7 +29,6 @@
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.account.GroupMembers;
import com.google.gerrit.server.account.externalids.ExternalId;
-import com.google.gerrit.server.group.InternalGroup;
import com.google.gerrit.server.project.NoSuchProjectException;
import com.google.gerrit.server.util.ManualRequestContext;
import com.google.gerrit.server.util.OneOffRequestContext;