Make Accounts available to Prolog predicates

Plugins like find-owners need to get account information
of a given email address when evaluating submit_rule.
The email address could be in OWNERS files.

Change-Id: I2fdf8fd26834963d8e65a79292ac2188b34e14cc
This commit is contained in:
Chih-Hung Hsieh
2017-07-18 16:22:38 -07:00
parent 73ab856329
commit 8257426085
9 changed files with 54 additions and 10 deletions

View File

@@ -27,6 +27,7 @@ import com.google.gerrit.server.AnonymousUser;
import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.account.Accounts;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.patch.PatchList;
import com.google.gerrit.server.patch.PatchListCache;
@@ -47,6 +48,7 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
public final class StoredValues {
public static final StoredValue<Accounts> ACCOUNTS = create(Accounts.class);
public static final StoredValue<AccountCache> ACCOUNT_CACHE = create(AccountCache.class);
public static final StoredValue<ReviewDb> REVIEW_DB = create(ReviewDb.class);
public static final StoredValue<ChangeData> CHANGE_DATA = create(ChangeData.class);