stable

Clone or download

Read-only

Display GitLab merge request author

This is part of story #17182: reference tuleap artifacts in gitlab merge requests How to test: - Have an integrated Gitlab repository - Update/create merge request with references (with keyword TULEAP-XXX) Expected result: - If the token is not revoked, a call to Gitlab API is done to get author data - If the token is revoked, an error is logged in gitlab_syslog - In artifact, => If the author has a public_email that match tuleap user, then tuleap user is displayed in the xRef => If the public_email doesn't match tuleap user, then author name is displayed => If there is no public_email, then author name is displayed Change-Id: Ie7d0d5f2404e10c88c205cf43d7453b435bccfed

Modified Files

Name
M plugins/gitlab/db/install.sql +2 −0 Go to diff View file
A plugins/gitlab/db/mysql/2021/202101290900_add_author_data_merge_request_columns.php +54 −0 Go to diff View file
M plugins/gitlab/include/Reference/GitlabCrossReferenceOrganizer.php +49 −2 Go to diff View file
M plugins/gitlab/include/Reference/MergeRequest/GitlabMergeRequest.php +31 −4 Go to diff View file
M plugins/gitlab/include/Reference/MergeRequest/GitlabMergeRequestReferenceRetriever.php +3 −1 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostMergeRequest/MergeRequestTuleapReferenceDao.php +17 −2 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookActionProcessor.php +84 −18 Go to diff View file
A plugins/gitlab/include/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookAuthorDataRetriever.php +73 −0 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookData.php +12 −1 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookDataBuilder.php +5 −1 Go to diff View file
M plugins/gitlab/include/gitlabPlugin.php +11 −2 Go to diff View file
M plugins/gitlab/tests/unit/Reference/GitlabCrossReferenceOrganizerTest.php +251 −3 Go to diff View file
A plugins/gitlab/tests/unit/Reference/MergeRequest/GitlabMergeRequestTest.php +52 −0 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/CrossReferenceFromMergeRequestCreatorTest.php +8 −4 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookActionProcessorTest.php +343 −14 Go to diff View file
A plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookAuthorDataRetrieverTest.php +141 −0 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookDataBuilderTest.php +19 −1 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/PreviouslySavedReferencesRetrieverTest.php +10 −5 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/WebhookActionsTest.php +2 −1 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/WebhookDataExtractorTest.php +2 −1 Go to diff View file