Merge branch 'stable-3.1'
* stable-3.1:
Pass change Id to submit hook
Change-Id: I94ed6f06fc99036d463b97093e86974f7c818d17
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 9070317..6ffd79e 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.entities.BranchNameKey;
+import com.google.gerrit.entities.Change;
import com.google.gerrit.entities.PatchSet;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.git.CodeReviewCommit;
@@ -42,12 +43,14 @@
CodeReviewCommit commit,
ProjectState destProject,
BranchNameKey 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.branch());
args.add("--submitter", caller.getNameEmail());