Don't bind "CherryPickCommit" in the "changes" module

It was moved from "projects" module to "changes" module by Id0d9030ad2
and was readded to "projects" module by I9bbdf2c4a. However, this endpoint
should only be contained in the "projects" module because it's an
endpoint built on COMMIT_KIND, which is a child resource of PROJECT_KIND
rather than CHANGE_KIND. Binding in "changes" module doesn't make it callable.
Also this endpoint is only documented in projects REST APIs:
https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#cherry-pick-commit

Change-Id: I9a58e37a352a4565b5fbf4bc72825d1bbc8dc137
This commit is contained in:
Changcheng Xiao
2018-10-01 17:30:21 +02:00
parent d996f641b8
commit 658ebda3e6

View File

@@ -25,7 +25,6 @@ import static com.google.gerrit.server.change.ReviewerResource.REVIEWER_KIND;
import static com.google.gerrit.server.change.RevisionResource.REVISION_KIND;
import static com.google.gerrit.server.change.RobotCommentResource.ROBOT_COMMENT_KIND;
import static com.google.gerrit.server.change.VoteResource.VOTE_KIND;
import static com.google.gerrit.server.project.CommitResource.COMMIT_KIND;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.extensions.restapi.RestApiModule;
@@ -178,7 +177,6 @@ public class Module extends RestApiModule {
delete(CHANGE_EDIT_KIND).to(ChangeEdits.DeleteContent.class);
get(CHANGE_EDIT_KIND, "/").to(ChangeEdits.Get.class);
get(CHANGE_EDIT_KIND, "meta").to(ChangeEdits.GetMeta.class);
post(COMMIT_KIND, "cherrypick").to(CherryPickCommit.class);
child(CHANGE_KIND, "messages").to(ChangeMessages.class);
get(CHANGE_MESSAGE_KIND).to(GetChangeMessage.class);