Merge branch 'stable-3.3' into stable-3.4

* stable-3.3:
  Allow to auto-assign to CC instead of reviewer
  Trigger owners-autoassign when setting WIP to false
  Only add owners with permissions to attention-set
  Reformat with GJF
  Update build instructions to include owners-api
  Fix linking to owners-api in standalone build
  Allow to skip auto-assign on WIP changes
  Upgrade bazlets to build with 3.3.4 API

Change-Id: Ibe8cd1d82cf65718c1072e611f37f29d55d1f97c
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 0d19aba..cabe670 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
@@ -74,6 +74,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;