Merge branch 'stable-3.1'
* stable-3.1: Revert "MergeValidationListener: Include the change Id in onPreMerge" Change-Id: I376a8d85fa934d9b7437ea52788f241e827cdfec
This commit is contained in:
commit
598435e31a
@ -15,7 +15,6 @@
|
||||
package com.google.gerrit.server.git.validators;
|
||||
|
||||
import com.google.gerrit.entities.BranchNameKey;
|
||||
import com.google.gerrit.entities.Change;
|
||||
import com.google.gerrit.entities.PatchSet;
|
||||
import com.google.gerrit.extensions.annotations.ExtensionPoint;
|
||||
import com.google.gerrit.server.IdentifiedUser;
|
||||
@ -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,
|
||||
BranchNameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException;
|
||||
|
@ -19,7 +19,6 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.gerrit.entities.Account;
|
||||
import com.google.gerrit.entities.BranchNameKey;
|
||||
import com.google.gerrit.entities.Change;
|
||||
import com.google.gerrit.entities.PatchSet;
|
||||
import com.google.gerrit.entities.Project;
|
||||
import com.google.gerrit.entities.RefNames;
|
||||
@ -82,7 +81,6 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
BranchNameKey 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 BranchNameKey destBranch,
|
||||
final Change.Id changeId,
|
||||
final PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
@ -255,12 +252,11 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
BranchNameKey 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,
|
||||
BranchNameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
@ -341,7 +336,6 @@ public class MergeValidators {
|
||||
CodeReviewCommit commit,
|
||||
ProjectState destProject,
|
||||
BranchNameKey destBranch,
|
||||
Change.Id changeId,
|
||||
PatchSet.Id patchSetId,
|
||||
IdentifiedUser caller)
|
||||
throws MergeValidationException {
|
||||
|
@ -847,8 +847,7 @@ public class MergeOp implements AutoCloseable {
|
||||
|
||||
MergeValidators mergeValidators = mergeValidatorsFactory.create();
|
||||
try {
|
||||
mergeValidators.validatePreMerge(
|
||||
or.repo, commit, or.project, destBranch, changeId, ps.id(), caller);
|
||||
mergeValidators.validatePreMerge(or.repo, commit, or.project, destBranch, ps.id(), caller);
|
||||
} catch (MergeValidationException mve) {
|
||||
commitStatus.problem(changeId, mve.getMessage());
|
||||
continue;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3daec7d491b0892f50a58baa5f15e0628dd97dba
|
||||
Subproject commit f4bf0ffbd13a748cc46a3368a8fadcc2cbab6e21
|
Loading…
x
Reference in New Issue
Block a user