stable

Clone or download

Read-only

feat: Save the last update date of inline comments

How to test: - Enable the feature flag: `tuleap config-set feature_flag_allow_pull_requests_comments_edition 1` - Use the API explorer to make a PATCH request to /pull_request_inline_comments/{id} route. - When you edit an inline comment, its last_edition_date will be saved. You can inspect the database to confirm it is saved with the date/time of the request. Notes: - Also introduce Option::fromNullable() to simplify/deduplicate ternary conditions involving `null` part of story #32316 Update comments Change-Id: I35f9080c6fc7a56936bd7181a9b7d318321603b8

Modified Files

Name
M plugins/pullrequest/include/PullRequest/Comment/Comment.php +1 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/InlineComment/Dao.php +5 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/InlineComment/InlineComment.php +16 −3 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/Comment/PATCHInlineCommentHandler.php +4 −3 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestInlineCommentsResource.php +2 −1 Go to diff View file
A plugins/pullrequest/tests/integration/InlineComment/InlineCommentDAOTest.php +94 −0 Go to diff View file
M plugins/pullrequest/tests/unit/InlineComment/InlineCommentTest.php +53 −26 Go to diff View file
M plugins/pullrequest/tests/unit/InlineComment/InlineCommentUpdaterTest.php +72 −148 Go to diff View file
M plugins/pullrequest/tests/unit/InlineComment/Notification/InlineCommentCodeContextExtractorTest.php +38 −71 Go to diff View file
M plugins/pullrequest/tests/unit/REST/v1/Comment/CommentRepresentationBuilderTest.php +14 −12 Go to diff View file
M plugins/pullrequest/tests/unit/REST/v1/Comment/PATCHInlineCommentHandlerTest.php +12 −5 Go to diff View file
M plugins/pullrequest/tests/unit/Tests/Builders/CommentTestBuilder.php +1 −1 Go to diff View file
M plugins/pullrequest/tests/unit/Tests/Builders/InlineCommentTestBuilder.php +11 −0 Go to diff View file
M plugins/pullrequest/tests/unit/Tests/Stub/InlineCommentSearcherStub.php +13 −12 Go to diff View file
M src/common/Option/Option.php +15 −0 Go to diff View file
M src/common/Option/README.md +12 −0 Go to diff View file
M tests/unit/common/Option/OptionTest.php +11 −0 Go to diff View file
M tests/unit/common/Option/TypeTest.php +31 −0 Go to diff View file