stable

Clone or download

Read-only

Automatically regenerate a hook when token is updated

Whenever the token is updated, the webhook is regenerated. This allow us to ensure that the provided token has needed api scope. Given you have a GitLab project integrated to Tuleap with a project access token, go to GitLab and revoke the token. 1. Create a new one with only `read_api` access scope. Go to Tuleap, open the modal to update the token. The token is accepted in the first step, but refused at the confirmation step. 2. Revoke the token, create a new one with `api` scope. Go to Tuleap, open the modal to update the token. The token is accepted and saved in the database. On GitLab the hook used to allow communication to Tuleap has been regenerated (you may need to check SSL verification configuration). Integration still works (comments, cross references, …) Part of story #17182: reference tuleap artifacts in gitlab merge requests Change-Id: If30c41f2711d021827ed898f33a6cdd47826883b

Modified Files

Name
M plugins/gitlab/include/REST/v1/BotApiTokenUpdater.php +21 −4 Go to diff View file
M plugins/gitlab/include/REST/v1/GitlabRepositoryResource.php +14 −2 Go to diff View file
M plugins/gitlab/site-content/fr_FR/LC_MESSAGES/tuleap-gitlab.po +4 −3 Go to diff View file
M plugins/gitlab/tests/unit/REST/v1/BotApiTokenUpdaterTest.php +108 −9 Go to diff View file