ReceiveCommits: Fire add comment hook when approvals provided

I52a6799395 extended magic branch options with approvals. It was
pointed out: [1] that add comment hook should also be fired in
this case.

[1] https://groups.google.com/d/topic/repo-discuss/Fr7Yuqqno2M/discussion

Reported-By: Björn Pedersen <iceelch@googlemail.com>
Change-Id: Ib8ae9f2537033423365b532bb3669d03cb1f63f6
This commit is contained in:
David Ostrovsky
2015-10-10 10:11:37 +02:00
committed by David Pursehouse
parent 44a935eb0a
commit 3eeb74f8f3
2 changed files with 12 additions and 0 deletions

View File

@@ -2306,6 +2306,11 @@ public class ReceiveCommits {
change, currentUser.getAccount(), newPatchSet, db, newCommit.getName());
}
if (!approvals.isEmpty()) {
hooks.doCommentAddedHook(change, currentUser.getAccount(), newPatchSet,
null, approvals, db);
}
if (magicBranch != null && magicBranch.submit) {
submit(changeCtl, newPatchSet);
}