stable
Clone or download
This is part of story #17182 reference tuleap artifacts in gitlab merge requests (You need I16e343d29514df92950bfb8d898d7d5eee9d39fc to test this patch.) How to test: - Have a GitLab instance with some repository - Have a GitLab repository with a GitLab repository API Token (this is the bot API token) [0] - Integrate the repository - In the integrated repository => Commit some stuff with in your commit message some references to tuleap artifacts [1] Expected results: - In the comment on your gitlab instance, you will see an comment from the bot that said => 'This commits references: TULEAP-XXX.' => There is a link to the artifact(s) and you are redirected to tuleap if you click on. - In logs (gitlab_syslog), you can see if a comment could be added or not [0] In your GitLab repository Setting => Access Tokens => Generate API token with "API" Scope [1] You can reference artifact with 'TULEAP-XXX' where 'XXX' is an artifact id. Change-Id: I832321f70fe8246271c60f9d97b865ee6e0ab1ca
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/gitlab/include/Repository/Token/GitlabBotApiTokenDao.php | +8 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Token/GitlabBotApiTokenRetriever.php | +58 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitBotCommenter.php | +108 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/PostPush/PostPushCommitCredentialsRetriever.php | +51 | −0 | Go to diff View file |
M | plugins/gitlab/include/Repository/Webhook/PostPush/PostPushWebhookActionProcessor.php | +13 | −6 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/PostPush/Presenters/PostPushCommitBotCommentPresenter.php | +47 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/PostPush/Presenters/PostPushCommitBotCommentReferencePresenter.php | +44 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/PostPush/Presenters/PostPushCommitBotCommentReferencePresenterBuilder.php | +57 | −0 | Go to diff View file |
M | plugins/gitlab/include/gitlabPlugin.php | +21 | −0 | Go to diff View file |
A | plugins/gitlab/templates/gitlab-bot-comment.mustache | +7 | −0 | Go to diff View file |
A | plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushCommitBotCommenterTest.php | +248 | −0 | Go to diff View file |
A | plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushCommitCredentialsRetrieverTest.php | +92 | −0 | Go to diff View file |
M | plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushWebhookActionProcessorTest.php | +19 | −1 | Go to diff View file |
A | plugins/gitlab/tests/unit/Repository/Webhook/PostPush/Presenters/PostPushCommitBotCommentReferencePresenterBuilderTest.php | +76 | −0 | Go to diff View file |