Merge branch 'stable-3.0' into stable-3.1 * stable-3.0: Submit: Get the change Id from the patch set Id Change-Id: I75d1c3aea53c580dc87c8d4a4911d8540ef9bd8f
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 6ffd79e..1358d0a 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/Submit.java
@@ -15,7 +15,6 @@ 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; @@ -43,14 +42,13 @@ 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("--change", patchSetId.changeId().get()); args.add("--project", projectName); args.add("--branch", destBranch.branch()); args.add("--submitter", caller.getNameEmail());