Package com.google.gerrit.server.project
Class LabelConfigValidator
java.lang.Object
com.google.gerrit.server.project.LabelConfigValidator
- All Implemented Interfaces:
CommitValidationListener
Validates modifications to label configurations in the
project.config file that is stored
in refs/meta/config.
Rejects setting/changing deprecated fields that are no longer supported (fields
copyAnyScore, copyMinScore, copyMaxScore, copyAllScoresIfNoChange,
copyAllScoresIfNoCodeChange, copyAllScoresOnMergeFirstParentUpdate,
copyAllScoresOnTrivialRebase, copyAllScoresIfListOfFilesDidNotChange,
copyValue).
Updates that unset the deprecated fields or that don't touch them are allowed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiononCommitReceived(CommitReceivedEvent receiveEvent) Commit validation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.gerrit.server.git.validators.CommitValidationListener
shouldValidateAllCommits
-
Field Details
-
KEY_COPY_ANY_SCORE
- See Also:
-
KEY_COPY_MIN_SCORE
- See Also:
-
KEY_COPY_MAX_SCORE
- See Also:
-
KEY_COPY_VALUE
- See Also:
-
KEY_COPY_ALL_SCORES_ON_MERGE_FIRST_PARENT_UPDATE
- See Also:
-
KEY_COPY_ALL_SCORES_ON_TRIVIAL_REBASE
- See Also:
-
KEY_COPY_ALL_SCORES_IF_NO_CODE_CHANGE
- See Also:
-
KEY_COPY_ALL_SCORES_IF_NO_CHANGE
- See Also:
-
KEY_COPY_ALL_SCORES_IF_LIST_OF_FILES_DID_NOT_CHANGE
- See Also:
-
-
Constructor Details
-
LabelConfigValidator
-
-
Method Details
-
onCommitReceived
public List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent) throws CommitValidationException Description copied from interface:CommitValidationListenerCommit validation.- Specified by:
onCommitReceivedin interfaceCommitValidationListener- Parameters:
receiveEvent- commit event details- Returns:
- list of validation messages
- Throws:
CommitValidationException- if validation fails
-