stable
Clone or download
This is part of story #17183 close artifacts from commit messages The behaviour must be the same as the both done for "resolves" and "closes". When the keyword "fixes", followed by a Tuleap reference is found, then the provided artifact will be closed with a comment : * If the artifact is found * If the artifact is in a project the GitLab repository is integrated in How to test: - Have 2 projects: => 1 with a GitLab repository integrated (Project A) => 1 without any GitLab repository (Project B) - Have 5 artifacts: => One open in project A (art #11) => 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: "fixes TULEAP-11 fixes TULEAP-12 fixes TULEAP-13 fixes TULEAP-14 fixes TULEAP-666" Expected results: - art #11 should not be closed - art #12 should be closed with a new follow-up "<tracker_shortname> fixed 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: I075601e8884a4c1812564a710e5853c58c66500c
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitArtifactUpdater.php | +2 | −1 | Go to diff View file |
M | plugins/gitlab/include/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilder.php | +7 | −2 | Go to diff View file |
M | plugins/gitlab/include/Repository/Webhook/WebhookTuleapReference.php | +1 | −1 | Go to diff View file |
M | plugins/gitlab/include/Repository/Webhook/WebhookTuleapReferencesParser.php | +4 | −1 | Go to diff View file |
M | plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushTuleapArtifactCommentBuilderTest.php | +101 | −9 | Go to diff View file |
M | plugins/gitlab/tests/unit/Repository/Webhook/WebhookTuleapReferencesParserTest.php | +41 | −2 | Go to diff View file |