Merge "Limit the number of comments per change (to 5000 by default)"

This commit is contained in:
Patrick Hiesel
2020-01-27 13:13:15 +00:00
committed by Gerrit Code Review
23 changed files with 555 additions and 266 deletions

View File

@@ -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);