Package com.google.gerrit.server.rules
Class DefaultSubmitRule
- java.lang.Object
-
- com.google.gerrit.server.rules.DefaultSubmitRule
-
- All Implemented Interfaces:
SubmitRule
public final class DefaultSubmitRule extends Object implements SubmitRule
Java implementation of Gerrit's default pre-submit rules behavior: check if the labels have the correct values, according to theLabelFunction
they are attached to.As this behavior is also implemented by the Prolog rules system, we skip it if at least one project in the hierarchy has a
rules.pl
file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultSubmitRule.DefaultSubmitRuleModule
-
Constructor Summary
Constructors Constructor Description DefaultSubmitRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<SubmitRecord>
evaluate(ChangeData cd)
Returns aOptional
ofSubmitRecord
status for the change.
-
-
-
Field Detail
-
RULE_NAME
public static final String RULE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
evaluate
public Optional<SubmitRecord> evaluate(ChangeData cd)
Description copied from interface:SubmitRule
Returns aOptional
ofSubmitRecord
status for the change.Optional#empty()
if the SubmitRule was a no-op.- Specified by:
evaluate
in interfaceSubmitRule
-
-