Validate comments and message in PostReview using new interface
This commit adds logic to PostReview to validate all comments that get published as well as the change message through the new CommentValidator. Tests cover both validation success and failure for these cases: - Publishing draft comments - Publishing comments directly - Adding a change message Surrounding logic is refactored where needed. Change-Id: I8ed6f721137766fc3d597d7b8484747e151814de
This commit is contained in:
@@ -25,9 +25,9 @@ import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||
public interface CommentValidator {
|
||||
|
||||
/**
|
||||
* Validate the specified commits.
|
||||
* Validate the specified comments.
|
||||
*
|
||||
* @return An empty list if all commits are valid, or else a list of validation failures.
|
||||
* @return An empty list if all comments are valid, or else a list of validation failures.
|
||||
*/
|
||||
ImmutableList<CommentValidationFailure> validateComments(
|
||||
ImmutableList<CommentForValidation> comments);
|
||||
|
Reference in New Issue
Block a user