Skip to main content
For self-hosted GitLab, first complete the GitLab sign-in setup.

Before you begin

  • A GitLab account with Maintainer access to the projects you want reviewed.
  • Permission to create an access token for that account, or a group Owner who can create a group access token.
  • A project where you can open a merge request.

Step 1: Create the access token

Create your GitLab access token

Choose a token type, generate it in GitLab, and copy the value before closing the page.

Step 2: Paste the token into CodeAnt AI

  1. Sign in to the CodeAnt AI dashboard with GitLab.
  2. Open Settings → Configure Token.
  3. Paste the access token and click Save & Configure Webhooks.
  4. On the Configure Repository Webhooks screen, CodeAnt AI lists every project missing a webhook. Use the search field and Select All to pick the projects you want reviewed, then click Create Webhooks (N).
CodeAnt AI shows a checkmark next to each project as the webhook is installed. Confirm installation succeeded for the project you want to test.
To add more projects, reopen Settings → Configure Token and select projects still missing webhooks. For group-level webhooks or a manual installation, use the manual webhook guide.

Get your first review

Open a new merge request in a project where webhook installation succeeded. CodeAnt posts feedback directly on the MR. When it finds an issue, its comment explains the problem, severity, and suggested fix. To review an existing MR or rerun a review, post:
The comments webhook must be installed for this command to reach CodeAnt.

Troubleshooting

The token saved in CodeAnt AI is no longer accepted by GitLab - usually because it expired or was revoked. Generate a new token and click Reconfigure on the Configure Token page. Webhooks already installed in GitLab keep working; you only need to re-run the repo-selection step if new repos were added.
  • Open Settings → Configure Token in CodeAnt AI and confirm the project appears in the list with a webhook installed. If it’s still in the “missing webhooks” list, select it and click Create Webhooks.
  • If the auto-install failed for a specific project, the token user (or service account) likely doesn’t have Maintainer access on that project. Fix the permission and reconfigure the token to retry.
  • In GitLab, open Settings → Webhooks on the project and use Test → Merge request events to confirm CodeAnt AI is reachable. A 2xx response confirms delivery, not that a review completed. Confirm that the saved token is valid, then post @codeant-ai: review on the MR. If feedback still does not appear, contact CodeAnt support with the project, MR URL, and webhook response. Do not include the token.
Reviews are posted as the user who owns the access token. Switch to a service-account personal access token or a group access token if you’d rather not use your own account - see the access token guide.
Group-level webhooks aren’t created automatically. Follow Manual Webhook Setup to add them yourself.

Next steps

Customize your reviews

Add review rules for your team’s coding standards.

Configure repository scans

Choose which analyses run and which files they include.