Before you begin
Most users can save an access token and let CodeAnt install project webhooks. Use this guide when you want group-level webhooks or need to create webhooks yourself. You need:- A valid GitLab access token saved in CodeAnt AI.
- Maintainer or Owner access for project webhooks, or Owner access for group webhooks.
- GitLab Premium or Ultimate for group webhooks. Project webhooks are available on all tiers. See GitLab’s webhook requirements.
Add both webhooks
Use project webhooks to review selected projects. Use group webhooks to receive events from projects in a group and its subgroups. Avoid installing both levels for the same projects, which can deliver duplicate events.1
Open webhook settings
In GitLab, open the project or group you want reviewed. Go to Settings → Webhooks and select Add new webhook.
2
Add the merge request webhook
Enter these values:
Select Add webhook. This webhook sends merge request events to CodeAnt for review.
3
Add the comments webhook
Select Add new webhook again and enter these values:
Select Add webhook. This webhook sends MR comments to CodeAnt, including review commands and questions.
Verify delivery and get a review
- Confirm that both webhooks appear in GitLab’s Settings → Webhooks.
- Use the merge request webhook’s Test menu to send a Merge request events test. Test the comments webhook with a Comments event as well.
- Check the response for each test. A 2xx response confirms that GitLab delivered the event to CodeAnt; it does not prove that token access or a review succeeded.
- Open a new merge request in a covered project and check for CodeAnt’s review feedback on the MR.
Troubleshooting
My webhook test fails
My webhook test fails
Compare the URL and trigger with the tables above. Keep SSL verification enabled. For self-hosted GitLab, confirm that the instance can reach
vcs.codeant.ai over HTTPS on port 443. Check the webhook’s recent delivery details for the response, and contact CodeAnt support if the endpoint still rejects the request.Delivery succeeds, but no review appears
Delivery succeeds, but no review appears
Confirm that a valid access token is saved under Settings → Configure Token in CodeAnt and that its identity has Maintainer access to the project. Check that the MR belongs to a project covered by the webhooks, then post
@codeant-ai: review. If it still fails, contact CodeAnt support with the MR URL and webhook response. Do not include the access token.Review commands do not receive a response
Review commands do not receive a response
Check that the comments webhook uses the comments endpoint and has Comments selected. The merge request events webhook alone does not deliver review commands.
I receive duplicate reviews
I receive duplicate reviews
Check whether both group and project webhooks send the same events to CodeAnt. Keep one set covering each project and remove the duplicate set.
Next steps
Customize your reviews
Add review rules for your team’s coding standards.
Ask about a finding
Ask CodeAnt questions directly on your merge request.