diff --git a/java/com/google/gerrit/acceptance/PushOneCommit.java b/java/com/google/gerrit/acceptance/PushOneCommit.java index 3ccbe4d85b..afd451ae31 100644 --- a/java/com/google/gerrit/acceptance/PushOneCommit.java +++ b/java/com/google/gerrit/acceptance/PushOneCommit.java @@ -25,6 +25,8 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.gerrit.common.Nullable; +import com.google.gerrit.common.UsedAt; +import com.google.gerrit.common.UsedAt.Project; import com.google.gerrit.entities.Account; import com.google.gerrit.entities.Change; import com.google.gerrit.entities.PatchSet; @@ -91,6 +93,14 @@ public class PushOneCommit { @Assisted String subject, @Assisted Map files); + @UsedAt(Project.PLUGIN_CODE_OWNERS) + PushOneCommit create( + PersonIdent i, + TestRepository testRepo, + @Assisted("subject") String subject, + @Assisted Map files, + @Assisted("changeId") String changeId); + PushOneCommit create( PersonIdent i, TestRepository testRepo, @@ -227,15 +237,16 @@ public class PushOneCommit { changeId); } - private PushOneCommit( + @AssistedInject + PushOneCommit( ChangeNotes.Factory notesFactory, ApprovalsUtil approvalsUtil, Provider queryProvider, - PersonIdent i, - TestRepository testRepo, - String subject, - Map files, - String changeId) + @Assisted PersonIdent i, + @Assisted TestRepository testRepo, + @Assisted("subject") String subject, + @Assisted Map files, + @Nullable @Assisted("changeId") String changeId) throws Exception { this.testRepo = testRepo; this.notesFactory = notesFactory; diff --git a/java/com/google/gerrit/common/UsedAt.java b/java/com/google/gerrit/common/UsedAt.java index 9f8b2551bd..e38ad9ad7f 100644 --- a/java/com/google/gerrit/common/UsedAt.java +++ b/java/com/google/gerrit/common/UsedAt.java @@ -34,6 +34,7 @@ public @interface UsedAt { GOOGLE, COLLABNET, PLUGIN_CHECKS, + PLUGIN_CODE_OWNERS, PLUGIN_DELETE_PROJECT, PLUGIN_SERVICEUSER, PLUGINS_ALL, // Use this project if a method/type is generally made available to all plugins.