stable

Clone or download

Read-only

feat: Display an "Already merged" state

part of story #31186 Add management of "Merge" This contribution introduces an "already merged" state which aims to be displayed when the pull-request is already merged. The pull-request representation now contain a "status_info" key which contain the date, status and user who has merged it. For the moment, I do not take into account the "abandoned" state, which will be implemented in a dedicated user story. How to test: - Go to an open pull-request - Merge it --> The state is displayed with your avatar and the merge date. Change-Id: I6909fb1d0e34404780d8a5fc32b072c66995824b

Modified Files

Name
M plugins/pullrequest/composer.json +5 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestRepresentation.php +8 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestRepresentationFactory.php +6 −20 Go to diff View file
A plugins/pullrequest/include/PullRequest/REST/v1/PullRequestStatusInfoRepresentation.php +56 −0 Go to diff View file
A plugins/pullrequest/include/PullRequest/REST/v1/PullRequestStatusInfoRepresentationBuilder.php +61 −0 Go to diff View file
A plugins/pullrequest/include/PullRequest/REST/v1/PullRequestStatusTypeConverter.php +48 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php +4 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/TimelineEventRepresentation.php +1 −21 Go to diff View file
M plugins/pullrequest/include/PullRequest/Timeline/Dao.php +14 −1 Go to diff View file
A plugins/pullrequest/include/PullRequest/Timeline/SearchMergeEvent.php +29 −0 Go to diff View file
M plugins/pullrequest/scripts/lib/constants/src/constants.ts +11 −4 Go to diff View file
M plugins/pullrequest/scripts/lib/rest-api-types/src/post-comments.ts +4 −2 Go to diff View file
M plugins/pullrequest/scripts/lib/rest-api-types/src/pull-request.ts +33 −2 Go to diff View file
M plugins/pullrequest/scripts/lib/rest-api-types/src/timeline.ts +3 −5 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/po/fr_FR.po +9 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/components/Actions/PullRequestAlreadyMergedState.test.ts +123 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/components/Actions/PullRequestAlreadyMergedState.vue +105 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Actions/PullRequestChangeStateActions.vue +2 −0 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/Actions/merge-status-helper.ts +2 −2 Go to diff View file
M plugins/pullrequest/scripts/pullrequest-overview/src/components/ReadOnlyInfo/PullRequestCIStatus.vue +3 −9 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/helpers/relative-dates-preference-helper.test.ts +42 −0 Go to diff View file
A plugins/pullrequest/scripts/pullrequest-overview/src/helpers/relative-dates-preference-helper.ts +30 −0 Go to diff View file
A plugins/pullrequest/tests/unit/Builders/PullRequestTestBuilder.php +81 −0 Go to diff View file
A plugins/pullrequest/tests/unit/REST/v1/PullRequestStatusInfoRepresentationBuilderTest.php +130 −0 Go to diff View file
A plugins/pullrequest/tests/unit/REST/v1/PullRequestStatusTypeConverterTest.php +40 −0 Go to diff View file
A plugins/pullrequest/tests/unit/Stub/SearchMergeEventStub.php +56 −0 Go to diff View file