Before you start
Installing Qodo on GitLab allows you to enhance your merge requests with automated insights and improvements. You can configure it for a single repository or roll it out to multiple projects or groups. Setup time is usually a few minutes, depending on whether you’re using a webhook or CI pipeline approach. After setup, Qodo will monitor merge requests, process their content, and publish outputs like descriptions, reviews, or improvement suggestions directly to your MRs.1. Log In to Qodo Portal
Before setting up Qodo, make sure to create a Qodo account and sign in. Once you’ve signed in to the Qodo Portal, you can follow the Qodo Git plugin installation guide straight from the portal, or continue reading here.2. Setup Qodo
Once you’ve signed in to your Qodo account, follow the instructions in the Qodo Portal or below to setup Qodo on GitLab.GitLab Repository
This installation method is available to subscribed users only.Visit Qodo’s Plans page to learn more.
Generate a GitLab access token: Generate either a personal, project or group level access token, and store the token in a safe place.
- Make sure to enable the “api” scope in order to allow Qodo to read pull requests, comment and respond to requests.

Generate a shared secret through Qodo registration page:
a. Go to https://register.gitlab.pr-agent.codium.ai
b. Fill in your generated GitLab token and your company or personal name in the appropriate fields and click Submit.
c. A shared secret will be generated. Store it in a safe place.
a. Go to https://register.gitlab.pr-agent.codium.ai
b. Fill in your generated GitLab token and your company or personal name in the appropriate fields and click Submit.
c. A shared secret will be generated. Store it in a safe place.

Install a GitLab webhook:
a. Go to the settings menu in your repository or groups, and click Webhooks.
b. Click Add new webhook.
c. In the webhook definition form, fill in the following fields:
i. URL: https://pro.gitlab.pr-agent.codium.ai/webhook
ii. Secret token: Your Qodo key
iii. Trigger: Check the Comments and Merge request events boxes.
iv. SSL Verification: Check the Enable SSL verification box.

a. Go to the settings menu in your repository or groups, and click Webhooks.
b. Click Add new webhook.
c. In the webhook definition form, fill in the following fields:
i. URL: https://pro.gitlab.pr-agent.codium.ai/webhook
ii. Secret token: Your Qodo key
iii. Trigger: Check the Comments and Merge request events boxes.
iv. SSL Verification: Check the Enable SSL verification box.

Visit our usage guide for next steps.
GitLab Pipeline
Create a CI file: Create a new file named
.gitlab-ci.yml with the content below:- This script will run Qodo Merge on every new merge request.
- You can modify the
rulessection to run Qodo Merge on different events. - You can also modify the
scriptsection to run different Qodo Merge commands, or with different parameters by exporting different environment variables.
Note:The
$CI_SERVER_FQDN variable is available only from GitLab version 16.10.If you’re using an earlier version, you can combine the variables $CI_SERVER_HOST and $CI_SERVER_PORT to achieve the same result.Add masked variables: Go to CI/CD, then choose Variables. In the masked variables section, add the following masked variables to your GitLab repository:
GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token.OPENAI_KEY: Your OpenAI key.
protected, or the pipeline will not have access to them.Visit our usage guide for next steps.
GitLab Webhook Server
Create a new GitLab user: In the group or project where you’d like to add Qodo Merge, create a new user and give it the Reporter role.
Obtain secret: Generate a random secret for your app, and save it for later (
shared_secret). For example, you can use:Prepare variables and secrets:
a. In the Qodo Merge configuration file:
a. In the Qodo Merge configuration file:
- Set
config.git_providerto “gitlab”
- Set your AI model key in the respective section
- In the
[gitlab]section:
- Set
personal_access_tokenwith the token from step 2. - Set
shared_secretwith the random secret from step 3.
- Set
Visit our usage guide for next steps.