Merge "Merge branch 'stable-2.16' into stable-3.0" into stable-3.0
This commit is contained in:
@@ -16,7 +16,6 @@ package com.google.gerrit.server.git.validators;
|
||||
|
||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
import com.google.gerrit.server.git.CodeReviewCommit;
|
||||
@@ -37,7 +36,6 @@ public interface MergeValidationListener {
|
||||
* @param commit commit details
|
||||
* @param destProject the destination project
|
||||
* @param destBranch the destination branch
|
||||
* @param changeId the change ID
|
||||
* @param patchSetId the patch set ID
|
||||
* @param caller the user who initiated the merge request
|
||||
* @throws MergeValidationException if the commit fails to validate
|
||||
@@ -47,7 +45,6 @@ public interface MergeValidationListener {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
Branch.NameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException;
|
||||
|
@@ -24,7 +24,6 @@ import com.google.gerrit.extensions.registration.Extension;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Branch;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gerrit.reviewdb.client.RefNames;
|
||||
@@ -82,7 +81,6 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
Branch.NameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
@@ -94,7 +92,7 @@ public class MergeValidators {
|
||||
groupValidatorFactory.create());
|
||||
|
||||
for (MergeValidationListener validator : validators) {
|
||||
validator.onPreMerge(repo, commit, destProject, destBranch, changeId, patchSetId, caller);
|
||||
validator.onPreMerge(repo, commit, destProject, destBranch, patchSetId, caller);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +157,6 @@ public class MergeValidators {
|
||||
final CodeReviewCommit commit,
|
||||
final ProjectState destProject,
|
||||
final Branch.NameKey destBranch,
|
||||
final Change.Id changeId,
|
||||
final PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
@@ -255,12 +252,11 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
Branch.NameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
mergeValidationListeners.runEach(
|
||||
l -> l.onPreMerge(repo, commit, destProject, destBranch, changeId, patchSetId, caller),
|
||||
l -> l.onPreMerge(repo, commit, destProject, destBranch, patchSetId, caller),
|
||||
MergeValidationException.class);
|
||||
}
|
||||
}
|
||||
@@ -290,7 +286,6 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
Branch.NameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
@@ -342,7 +337,6 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
Branch.NameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
|
@@ -836,7 +836,7 @@ public class MergeOp implements AutoCloseable {
|
||||
MergeValidators mergeValidators = mergeValidatorsFactory.create();
|
||||
try {
|
||||
mergeValidators.validatePreMerge(
|
||||
or.repo, commit, or.project, destBranch, changeId, ps.getId(), caller);
|
||||
or.repo, commit, or.project, destBranch, ps.getId(), caller);
|
||||
} catch (MergeValidationException mve) {
|
||||
commitStatus.problem(changeId, mve.getMessage());
|
||||
continue;
|
||||
|
Submodule plugins/hooks updated: df7cf871ac...d0976393a5
Reference in New Issue
Block a user