Prior to invoking the submit_rule(X)
query for a change, Gerrit initializes the Prolog engine with a set of facts (current data) about this change. The following table provides an overview of the provided facts.
Important
All the terms listed below are defined in the
gerrit
package. To use any of them we must use a qualified name likegerrit:change_branch(X)
.
In addition Gerrit provides a set of built-in helper predicates that can be used when implementing the submit_rule
predicate. The most common ones are listed in the following table.
Note
For a complete list of built-in helpers read the
gerrit_common.pl
and all Java classes whose name matchesPRED_*.java
from Gerrit’s source code.
Part of Gerrit Code Review