Class MergeValidators.ProjectConfigValidator
java.lang.Object
com.google.gerrit.server.git.validators.MergeValidators.ProjectConfigValidator
- All Implemented Interfaces:
MergeValidationListener
- Enclosing class:
- MergeValidators
public static class MergeValidators.ProjectConfigValidator
extends Object
implements MergeValidationListener
Validator for any commits to
refs/meta/config
.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProjectConfigValidator
(AllProjectsName allProjectsName, AllUsersName allUsersName, ProjectCache projectCache, PermissionBackend permissionBackend, DynamicMap<ProjectConfigEntry> pluginConfigEntries, ProjectConfig.Factory projectConfigFactory, org.eclipse.jgit.lib.Config config) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onPreMerge
(org.eclipse.jgit.lib.Repository repo, CodeReviewCommit.CodeReviewRevWalk revWalk, CodeReviewCommit commit, ProjectState destProject, BranchNameKey destBranch, PatchSet.Id patchSetId, IdentifiedUser caller) Validate a commit before it is merged.
-
Constructor Details
-
ProjectConfigValidator
@Inject public ProjectConfigValidator(AllProjectsName allProjectsName, AllUsersName allUsersName, ProjectCache projectCache, PermissionBackend permissionBackend, DynamicMap<ProjectConfigEntry> pluginConfigEntries, ProjectConfig.Factory projectConfigFactory, org.eclipse.jgit.lib.Config config)
-
-
Method Details
-
onPreMerge
public void onPreMerge(org.eclipse.jgit.lib.Repository repo, CodeReviewCommit.CodeReviewRevWalk revWalk, CodeReviewCommit commit, ProjectState destProject, BranchNameKey destBranch, PatchSet.Id patchSetId, IdentifiedUser caller) throws MergeValidationException Description copied from interface:MergeValidationListener
Validate a commit before it is merged.- Specified by:
onPreMerge
in interfaceMergeValidationListener
- Parameters:
repo
- the repositoryrevWalk
- the rev walkcommit
- commit detailsdestProject
- the destination projectdestBranch
- the destination branchpatchSetId
- the patch set IDcaller
- the user who initiated the merge request- Throws:
MergeValidationException
- if the commit fails to validate
-