stable

Clone or download

Read-only

refactor: build comments outside of ArtifactUpdater

part of story #26802 have smart commit with Tuleap Git No functional change expected in GitLab artifact closure: - when there is a Done or a Closed value, the Artifact is closed with a comment - when there is no Done or Closed value, or there is no Status field, a comment is added on the artifact to explain the problem. Notes: The goal of this series of refactorings is to move PostPushCommitArtifactUpdater to the Trackers plugin in order to reuse it for the Git plugin. To do that, we need to remove everything specific to GitLab (such as the contents of the comments, the username fallback logic, etc.) and keep only the "base algorithm", which is "closing an artifact with the done or status value". Change-Id: Iae9e62472f6a4a6b884c3823fe806f756299d067

Modified Files

Name
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitArtifactUpdater.php +5 −57 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilder.php +1 −1 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushWebhookCloseArtifactHandler.php +35 −2 Go to diff View file
M plugins/gitlab/include/gitlabPlugin.php +0 −2 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushCommitArtifactUpdaterTest.php +7 −66 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilderTest.php +75 −193 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushWebhookCloseArtifactHandlerTest.php +51 −6 Go to diff View file
A plugins/tracker/tests/unit/Builders/NewCommentTestBuilder.php +63 −0 Go to diff View file