Enable Optibot to analyze your GitLab repositories, automate code reviews, and generate contextual summaries.
Setup time: ~12–15 minutes
Required permissions: Maintainer or Admin on the GitLab group or repository.
Sign Up and Access the Integration Page
-
Go to the Optimal AI signup page.
-
Select “Sign Up with GitLab.”
-
Complete your account details and verify your email address.
-
After verification, you’ll be redirected to the GitLab Integration Setup page.
Create a GitLab Access Token
Optibot requires a GitLab Access Token from a bot or service account with specific permissions to interact with your repositories.
Steps:
-
In GitLab, navigate to your group or repository’s Settings → Access Tokens.
(Group tokens are recommended for multi-repository installations.) -
Click “Add new token.”
-
Enter a Token name, e.g., Optibot-code-review or Optibot Reviewer.
-
Add a short description, and set the expiration date to the maximum allowed.
-
Assign the role as Maintainer.
-
Under Scopes, select all of the following:
-
api — Full API access
-
read_repository — Clone and read repositories
-
write_repository — Create merge request comments
-
read_user — Access user information
-
Retrieve the Bot/User ID
Optibot also needs the Bot or User ID associated with your GitLab token.
-
Navigate to your Admin Area → Users.
-
Search for the service or bot account (e.g., Optibot-code-review-2).
-
Open the user profile and note the ID listed under the account section.
Example: ID: 16
Connect GitLab to Optimal AI
Once you have your token and user ID:
-
Return to the GitLab Setup Page.
-
If using GitLab self-hosted, replace the default URL gitlab.com with your custom domain.
-
Enter:
-
GitLab Token — your access token from Step 2
-
GitLab Bot/User ID — the numeric ID from Step 3
-
-
Click “Connect GitLab.”
Select Repositories for Installation
After connecting, you’ll see a list of available repositories.
-
Select the repositories where you want Optibot to be active.
-
Optibot will automatically:
-
Install itself in each selected repo
-
Create necessary webhooks for real-time event monitoring
-
You can manage or update these repositories anytime via the GitLab Integration Dashboard.
Verify Installation
Once setup completes:
-
Optibot will begin analyzing merge requests automatically.
-
You can confirm installation by checking your GitLab Repository → Settings → Webhooks.
There should be an entry for agents.getoptimal.ai.
Optibot Features on GitLab
Once integrated, Optibot enables:
-
🧠 Automated Code Reviews
Reviews each new merge request and provides detailed feedback directly in GitLab comments. -
🧾 AI-Generated Summaries
Generates structured summaries and line-by-line breakdowns of code changes for every MR. -
⚙️ Contextual Recommendations
Highlights potential issues, security concerns, or missing documentation based on code patterns. -
🔗 Cross-Tool Integration
Works seamlessly with Jira, Bitbucket, and other tools for compliance and reporting.
For additional configuration options, visit the Advanced Configuration page.
✅ Your Optibot GitLab integration is now complete.
From here, you can monitor and manage your integrations anytime at:
🔗 https://agents.getoptimal.ai/dashboard/gitlab-integration