Predicates to expose change/commit info to Prolog
Adds new predicates that expose the branch, owner, project, and topic of a change, the author and committer of the most recent patchset in the change, and who is the current user. For user-related predicates, if the user is not a gerrit user, will return user(anonymous) or similar. Author and committer predicates for commits return user(id), name, and email. Change-Id: Ic79564f3f3a070faa4082a47954597fa3717a065
This commit is contained in:
@@ -18,6 +18,7 @@ import static com.google.gerrit.rules.StoredValue.create;
|
||||
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.PatchSetInfo;
|
||||
import com.google.gerrit.reviewdb.ReviewDb;
|
||||
import com.google.gerrit.server.project.ChangeControl;
|
||||
|
||||
@@ -26,7 +27,8 @@ public final class StoredValues {
|
||||
public static final StoredValue<Change> CHANGE = create(Change.class);
|
||||
public static final StoredValue<PatchSet.Id> PATCH_SET_ID = create(PatchSet.Id.class);
|
||||
public static final StoredValue<ChangeControl> CHANGE_CONTROL = create(ChangeControl.class);
|
||||
public static final StoredValue<PatchSetInfo> PATCH_SET_INFO = create(PatchSetInfo.class);
|
||||
|
||||
private StoredValues() {
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user