stable
Clone or download
Read-only
part of story #29257 have a thread of comments How to test: Create a new global comment in UI Create a new inline comment in UI Go check in database, as they do not have reply, no color is saved Reply to your global and inline comment Go check in database, thread color is saved Note: The color assigner mix the count of inline comment and global comment in order to avoid make colors weird Example: I have a comment on a file and a global comment it seems expected that my two threads have different colors Note: Nothing is said when the same pullrequest has many thread, I choose to restart the color palette by using modulo, this behaviour can be easily changed if needed Change-Id: I193fd7f6eed552d865d3af6849907346baf986e5
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/pullrequest/db/install.sql | +3 | −1 | Go to diff View file |
A | plugins/pullrequest/db/mysql/updates/2022/202211171452_add_pullrequest_color_in_comment_table.php | +71 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Comment/Dao.php | +7 | −1 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Comment/Factory.php | +2 | −2 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/Comment/ParentCommentSearcher.php | +28 | −0 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/Comment/ThreadColorUpdater.php | +28 | −0 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/Comment/ThreadCommentDao.php | +41 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/InlineComment/Dao.php | +13 | −2 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/InlineComment/InlineCommentCreator.php | +8 | −21 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/InlineComment/InlineCommentRetriever.php | +1 | −1 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/REST/v1/Comment/ThreadColors.php | +40 | −0 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/REST/v1/Comment/ThreadCommentColorAssigner.php | +57 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php | +7 | −1 | Go to diff View file |
M | plugins/pullrequest/tests/unit/Comment/Notification/PullRequestNewCommentNotificationToProcessBuilderTest.php | +2 | −1 | Go to diff View file |
M | plugins/pullrequest/tests/unit/InlineComment/InlineCommentCreatorTest.php | +8 | −4 | Go to diff View file |
M | plugins/pullrequest/tests/unit/InlineComment/InlineCommentRetrieverTest.php | +9 | −9 | Go to diff View file |
M | plugins/pullrequest/tests/unit/REST/v1/Comment/ParentIdValidatorForCommentTest.php | +6 | −3 | Go to diff View file |
A | plugins/pullrequest/tests/unit/REST/v1/Comment/ThreadCommentColorAssignerTest.php | +74 | −0 | Go to diff View file |