Move linking comments with change messages to Gerrit's backend

There are currently 2 different APIs for getting change messages and
published comments (GET /changes/{change_id}/detail and
GET/changes/{change_id}/comments respectively). The comments objects do
not contain an ID that references the change message to which they
belong.

This linking is done in the front end, and this change is moving this
implementation to the backend.

Change-Id: Id6dbec7325eaa7ae582a4f435ed0ed77a25306bd
This commit is contained in:
Youssef Elghareeb
2020-02-03 12:00:52 +01:00
parent 96110f5945
commit 7fdfa44975
10 changed files with 354 additions and 23 deletions

View File

@@ -135,10 +135,15 @@ public class TestCommentHelper {
public void addRobotComment(String targetChangeId, RobotCommentInput robotCommentInput)
throws Exception {
addRobotComment(targetChangeId, robotCommentInput, "robot comment test");
}
public void addRobotComment(
String targetChangeId, RobotCommentInput robotCommentInput, String message) throws Exception {
ReviewInput reviewInput = new ReviewInput();
reviewInput.robotComments =
Collections.singletonMap(robotCommentInput.path, ImmutableList.of(robotCommentInput));
reviewInput.message = "robot comment test";
reviewInput.message = message;
gApi.changes().id(targetChangeId).current().review(reviewInput);
}
}