Use ChangeControl from ChangeNotes Use the canonical way of getting change control using the change notes, since the removal of controlForIndexedChange method on ProjectControl. Natural follow-up of the clean-up on Gerrit master of the ways of getting ChangeControl. Change-Id: I2a4615e588764517e062eafa69ceb7dd4d8258a0
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java index 7b536a2..b52750b 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java
@@ -200,11 +200,12 @@ if (destChanges.size() == 1) { // The change key exists on the destination branch: adding a new // patch-set - Change destChange = destChanges.get(0).change(); + ChangeData destChangeData = destChanges.get(0); + Change destChange = destChangeData.change(); ChangeControl changeControl = projectControlFactory .controlFor(project.getNameKey()) - .controlForIndexedChange(destChange); + .controlFor(destChangeData.notes()); insertPatchSet(bu, repo, destChange, pullRequestCommit, changeControl, pullRequestMesage); return destChange.getId(); }