Skip to main content
Vidoc connects to GitLab through a bot user. You give Vidoc an access token of the bot user. GitLab calls a pull request (PR) a merge request (MR). These pages use “pull request” and “PR” for all platforms. On GitLab, Vidoc can:
  • Review each PR and write a summary comment and inline comments.
  • Resolve its own comment threads when a later scan shows that the issue is fixed.
  • Read commands and questions that mention the bot user in PR comments.
  • Record feedback from replies and 👍/👎 reactions on its comments.
  • Show a commit status, when status reporting is on.
For a comparison with other platforms, refer to Supported platforms.

Requirements

  • Vidoc Cloud connects to GitLab.com. To use a self-managed GitLab instance, contact Vidoc.
  • A GitLab user for Vidoc (the bot user). The user account must be active.
  • An access token of the bot user with the api scope.
  • The bot user has the Maintainer role (or higher) on each project to scan. Vidoc creates project webhooks with this token. The Developer role is not sufficient.
  • You have the Admin role in Vidoc.

Select the token type

You can use one of these token types: The username of the bot user is the handle that developers mention in PR comments. Select a short name that is easy to type.

Connect GitLab

You must have the Admin role in Vidoc.
1

Open the GitLab connection

In the web app, open the account menu and select Integrations. On the GitLab card, click Connect. You can also start from the Repositories page. If GitLab is already connected, click the card, then click Add connection.
On Vidoc Cloud, the onboarding flow shows the same steps when you create your organization.
2

Add the bot access token

In Connect GitLab bot account (step 1 of 2), paste the token in Bot access token. Click Continue. Vidoc checks the token with GitLab.
3

Select projects

In Select Projects (step 2 of 2), select the projects to import. Click Connect selected.

Import more projects later

  1. Open Integrations > GitLab.
  2. Open the actions menu of the GitLab account and select Import repositories.
The list shows the projects where the bot user is a member. To add a project to the list, add the bot user to the project in GitLab with the Maintainer role first.

Turn on PR reviews for projects

Open Repositories in the web app. Turn on the PR reviews toggle for each project to scan. You must have the Developer role or higher. When you turn on PR reviews:
  • Vidoc creates a project webhook in GitLab. The webhook sends push, merge request, and comment events to Vidoc. You do not create it by hand.
  • Vidoc indexes the default branch of the project. On the Enterprise plan and on self-hosted installations, Vidoc then runs a first full scan of the default branch. Refer to Scan types.
  • Vidoc then reviews each new PR and each update to a PR.
On Vidoc Cloud, indexing and PR reviews start only when your organization has an active plan.
The PR comments toggle is in the actions menu of each repository. When it is off, Vidoc still scans PRs, but it does not write to GitLab. For all repository controls, refer to Repositories.

GitLab specifics

Update credentials

Replace the token before it expires, or after you rotate it in GitLab:
  1. Open Integrations > GitLab.
  2. Open the actions menu of the GitLab account and select Bot account.
  3. Paste the new token in Rotate bot access token.
  4. Click Save bot token.
If you use a token of a different GitLab user, the bot handle changes. Tell your developers the new handle.

Troubleshooting