Follow the below steps for Gitlab pull request review configuration:

Group level settings

  • If you are on Gitlab Premium or Gitlab Ultimate, then you can create group level access tokens and webhooks.
  1. 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://ved6vc7dkvz3veaigrllnasa4y0kmqbw.lambda-url.ap-south-1.on.aws/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://ved6vc7dkvz3veaigrllnasa4y0kmqbw.lambda-url.ap-south-1.on.aws/pr/gitlab/handle_comment/handleGitLabMRComment
      • Trigger: Comments
      • Enable SSL verification: Check
  2. 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: Developer
      • Scopes: api, write_repository
  3. 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

Your pull requests will now start being reviewed by CodeAnt AI.

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.
  1. 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://ved6vc7dkvz3veaigrllnasa4y0kmqbw.lambda-url.ap-south-1.on.aws/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://ved6vc7dkvz3veaigrllnasa4y0kmqbw.lambda-url.ap-south-1.on.aws/pr/gitlab/handle_comment/handleGitLabMRComment
      • Trigger: Comments
      • Enable SSL verification: Check
  2. 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: Developer
      • Scopes: api, write_repository
  3. 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

Your pull requests will now start being reviewed by CodeAnt AI.