stable

Clone or download

Read-only

Closes artifact with 'resolve' keyword

This is part of story #17183 close artifacts from commit messages How to test: - Have 2 projects: => 1 with a GitLab repository integrated (Project A) => 1 without any GitLab repository (Project B) - Have 4 artifacts: => One open in project A (art #12) => One closed in project A (art #13) => One without any status semantic in project A (art #14) => One open in project B (art #666) - Commit with a message like: "resolve TULEAP-12 resolves TULEAP-13 resolves TULEAP-14 resolve TULEAP-666" Expected results: - art #12 should be closed with a new follow-up "solved by @user with gitlab_commit #namespace/myRepo/ab686" - art #13 should be still closed, without any follow-up but there is a log in gilab_syslog "artifact #14 already closed, can not be closed by gitlab commit" - art #14 should be stilled open, with a new follow-up "attempts to close this artifact from GitLab but no status semantic defined." - art #666 is still opened, there is no new follow-up Change-Id: I9820c827a60bc7d89d7608170506b81cf38b3eaa

Modified Files

Name
A plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitArtifactUpdater.php +133 −0 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitBotCommenter.php +1 −44 Go to diff View file
A plugins/gitlab/include/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilder.php +44 −0 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushWebhookActionProcessor.php +2 −1 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/PostPush/PostPushWebhookCloseArtifactHandler.php +40 −13 Go to diff View file
M plugins/gitlab/include/Repository/Webhook/WebhookTuleapReferencesParser.php +2 −2 Go to diff View file
M plugins/gitlab/include/gitlabPlugin.php +8 −2 Go to diff View file
A plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushCommitArtifactUpdaterTest.php +389 −0 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushCommitBotCommenterTest.php +1 −132 Go to diff View file
A plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilderTest.php +57 −0 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushWebhookCloseArtifactHandlerTest.php +126 −19 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/WebhookTuleapReferencesParserTest.php +2 −2 Go to diff View file