stable
Clone or download
Read-only
No functional change expected when creating a new comment through the REST API. Notes: - Ideally, the POSTHandler should also do the validation: checking the parent ID is valid, fetching the pull request and its ref, etc. Since my main goal here is to eliminate the "0" id in Comment, I have left these out. Having a POSTHandler with unit tests that "just creates" the comment and adds default values is still better than before. part of story #32316 Update comments Change-Id: I4f1fc0e06616f4a4e62fd679ba824120cc1a7b7d
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/pullrequest/include/PullRequest/REST/v1/Comment/POSTCommentHandler.php | +90 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/CommentPOSTRepresentation.php | +14 | −8 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php | +12 | −25 | Go to diff View file |
M | plugins/pullrequest/tests/rest/PullRequest/PullRequestsCommentsTest.php | +19 | −26 | Go to diff View file |
A | plugins/pullrequest/tests/unit/REST/v1/Comment/POSTCommentHandlerTest.php | +144 | −0 | Go to diff View file |
M | plugins/pullrequest/tests/unit/REST/v1/InlineComment/POSTHandlerTest.php | +1 | −0 | Go to diff View file |