Limit the number of comments per change (to 5000 by default)
Also refactor the robot comment size check to be in line with the size check for human comments. Change-Id: If24adc10f5f16cd8894bf246078f0e6c992cdafa
This commit is contained in:
@@ -128,7 +128,8 @@ import com.google.gerrit.server.git.ReceivePackInitializer;
|
||||
import com.google.gerrit.server.git.TagCache;
|
||||
import com.google.gerrit.server.git.TransferConfig;
|
||||
import com.google.gerrit.server.git.receive.ReceiveCommitsModule;
|
||||
import com.google.gerrit.server.git.validators.CommentLimitsValidator;
|
||||
import com.google.gerrit.server.git.validators.CommentCountValidator;
|
||||
import com.google.gerrit.server.git.validators.CommentSizeValidator;
|
||||
import com.google.gerrit.server.git.validators.CommitValidationListener;
|
||||
import com.google.gerrit.server.git.validators.MergeValidationListener;
|
||||
import com.google.gerrit.server.git.validators.MergeValidators;
|
||||
@@ -410,8 +411,11 @@ public class GerritGlobalModule extends FactoryModule {
|
||||
DynamicSet.setOf(binder(), UploadValidationListener.class);
|
||||
|
||||
bind(CommentValidator.class)
|
||||
.annotatedWith(Exports.named(CommentLimitsValidator.class.getSimpleName()))
|
||||
.to(CommentLimitsValidator.class);
|
||||
.annotatedWith(Exports.named(CommentCountValidator.class.getSimpleName()))
|
||||
.to(CommentCountValidator.class);
|
||||
bind(CommentValidator.class)
|
||||
.annotatedWith(Exports.named(CommentSizeValidator.class.getSimpleName()))
|
||||
.to(CommentSizeValidator.class);
|
||||
|
||||
DynamicMap.mapOf(binder(), DynamicOptions.DynamicBean.class);
|
||||
DynamicMap.mapOf(binder(), ChangeQueryBuilder.ChangeOperatorFactory.class);
|
||||
|
||||
Reference in New Issue
Block a user