Pass change Id to submit hook
Bug: Issue 11905
Change-Id: I3761c369c3f10b215b1afeb43cae59bc194e9a44
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java
index e383200..2892b04 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java
@@ -15,6 +15,7 @@
package com.googlesource.gerrit.plugins.hooks;
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;
@@ -42,12 +43,14 @@
CodeReviewCommit commit,
ProjectState destProject,
Branch.NameKey destBranch,
+ Change.Id changeId,
PatchSet.Id patchSetId,
IdentifiedUser caller)
throws MergeValidationException {
String projectName = destProject.getProject().getName();
HookArgs args = hookFactory.createArgs();
+ args.add("--change", changeId.get());
args.add("--project", projectName);
args.add("--branch", destBranch.get());
args.add("--submitter", caller.getNameEmail());