Group level settings
- If you are on Gitlab Premium or Gitlab Ultimate, then you can create group level access tokens and webhooks.
-
Add Webhooks:
- Group Settings: Select group -> Settings -> Webhooks -> Add new webhook
-
Webhook for Pull Request Events:
- Title: CodeAnt AI Webhook for Pull Request Events
- URL:
https://api.codeant.ai/pr/gitlab/pr_review/processMergeRequestGitLab
- Trigger: Merge request events
- Enable SSL verification: Check
-
Webhook for Pull Request Question Answering:
- Title: CodeAnt AI Webhook for Pull Request Question Answering
- URL:
https://api.codeant.ai/pr/gitlab/handle_comment/handleGitLabMRComment
- Trigger: Comments
- Enable SSL verification: Check
- Webhook for Commit Status:
- Title: CodeAnt AI Webhook for Commit Status
- URL:
https://api.codeant.ai/handleGitlabCodeSuggestionAccepted
- Trigger: Push Events (All Branches)
- Enable SSL verification: Check
-
Configure Access Tokens:
- Access token type - You can create group level or project level access tokens
- Group access token settings: Select group -> More -> Group settings -> Settings -> Access tokens
-
Access Token Details:
- Name: CodeAnt AI
- Expiry date: Ideally 1 year
- Role: Maintainer
- Scopes: api, write_repository
-
Add Repositories/Projects:
- Sign In: Go to app.codeant.ai -> sign in with Gitlab
- Settings: Navigate to Settings -> Add Repos
- Add Group: If the access token is of group then add group
- Add access token and save
Project level settings
- If your current plan does not allow you to create group level webhooks and access tokens you can create project level access token and webhooks.
-
Add Webhooks:
- Project Settings: Select project -> Settings -> Webhooks -> Add new webhook
-
Webhook for Pull Request Events:
- Title: CodeAnt AI Webhook for Pull Request Events
- URL:
https://api.codeant.ai/pr/gitlab/pr_review/processMergeRequestGitLab
- Trigger: Merge request events
- Enable SSL verification: Check
-
Webhook for Pull Request Question Answering:
- Title: CodeAnt AI Webhook for Pull Request Question Answering
- URL:
https://api.codeant.ai/pr/gitlab/handle_comment/handleGitLabMRComment
- Trigger: Comments
- Enable SSL verification: Check
- Webhook for Commit Status:
- Title: CodeAnt AI Webhook for Commit Status
- URL:
https://api.codeant.ai/handleGitlabCodeSuggestionAccepted
- Trigger: Push Events (All Branches)
- Enable SSL verification: Check
-
Configure Access Tokens:
- Access token type - You can create group level or project level access tokens
- Project access token settings: Select project -> Settings -> Access tokens
-
Access Token Details:
- Name: CodeAnt AI
- Expiry date: Ideally 1 year
- Role: Maintainer
- Scopes: api, write_repository
-
Add Repositories/Projects:
- Sign In: Go to app.codeant.ai -> sign in with Gitlab
- Settings: Navigate to Settings -> Add Repos
- Add Project: If the access token is of project then add group/subgroup/project
- Add access token and save