GitLab
Read, comment on, and close GitLab merge requests and issues from a workbench
The GitLab tool lets a workbench agent call the GitLab REST API for merge requests and issues. The agent can read a merge request or issue with its notes (comments), post and edit notes, award emoji on notes, and close a merge request without merging it. The tool works with GitLab.com and self-managed GitLab.
For the complete list of integrations and general tool behavior, see Workbench tools.
Prerequisites
Before you begin, make sure you have:
- A GitLab.com account or a self-managed GitLab instance with the projects the workbench should work with.
- A GitLab access token that can see those projects. See Create an access token.
- Permission in Plural Console to create a configured tool and edit the target workbench.
- An existing workbench, or permission to create one. See Setting up a workbench.
Create an access token
You can use a personal access token, a project access token, or a group access token. A project or group token limits the agent to that project or group, so prefer one when the workbench only needs a few projects.
To create a personal access token:
- In GitLab, select your avatar in the upper-right corner and select Edit profile.
- In the left sidebar, select Access → Personal access tokens. On older GitLab versions, this is User Settings → Access Tokens.
- Generate a token, enter a name and an expiry date, and select the scope from GitLab scopes.
- Create the token and copy its value. GitLab shows it only once.
For a project or group token, open the project or group, go to Settings → Access tokens, and select the same scope. The token also needs a role in the project that allows the actions you want, such as commenting or closing merge requests.