Merge "Move doRefUpdatedHook to validateForReceiveCommits"
This commit is contained in:
@@ -897,19 +897,6 @@ public class ReceiveCommits {
|
||||
continue;
|
||||
}
|
||||
|
||||
HookResult result = hooks.doRefUpdateHook(project, cmd.getRefName(),
|
||||
user.getAccount(), cmd.getOldId(),
|
||||
cmd.getNewId());
|
||||
|
||||
if (result != null) {
|
||||
final String message = result.toString().trim();
|
||||
if (result.getExitValue() != 0) {
|
||||
reject(cmd, message);
|
||||
continue;
|
||||
}
|
||||
rp.sendMessage(message);
|
||||
}
|
||||
|
||||
if (MagicBranch.isMagicBranch(cmd.getRefName())) {
|
||||
parseMagicBranch(cmd);
|
||||
continue;
|
||||
|
||||
@@ -131,6 +131,7 @@ public class CommitValidators {
|
||||
validators.add(new ConfigValidator(refControl, repo));
|
||||
validators.add(new BannedCommitsValidator(rejectCommits));
|
||||
validators.add(new PluginCommitValidationListener(commitValidationListeners));
|
||||
validators.add(new ChangeHookValidator(refControl, hooks));
|
||||
|
||||
List<CommitValidationMessage> messages = new LinkedList<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user