Guide for GitLab
Integrate the AI Code Review Agent into your GitLab workflow.
Last updated
Was this helpful?
Integrate the AI Code Review Agent into your GitLab workflow.
Last updated
Was this helpful?
Speed up code reviews by configuring the with your GitLab repositories. In this guide, you'll learn how to set up the Agent to receive automated code reviews that trigger whenever you create a pull request, as well as how to manually initiate reviews using .
Coming soon...
Before proceeding, ensure you've completed all necessary prerequisites.
For GitLab merge request code reviews, a token with api
scope is required. Make sure that the token is created by a GitLab user who has the Maintainer
access role.
If your GitLab organization enforces SAML Single Sign-On (SSO), you must authorize your Personal Access Token through your Identity Provider (IdP); otherwise, Bito's AI Code Review Agent won't function properly.
For more information, please refer to these GitLab documentation:
Follow the step-by-step instructions below to install the AI Code Review Agent using Bito Cloud:
Bito supports integration with the following Git providers:
GitHub
GitHub (Self-Managed)
GitLab
GitLab (Self-Managed)
Bitbucket
Since we are setting up the Agent for GitLab, select GitLab to proceed.
To enable merge request reviews, you’ll need to connect your Bito workspace to your GitLab account.
You can either connect using OAuth (recommended) for a seamless, one-click setup or manually enter your Personal Access Token.
To connect via OAuth, simply click the Connect with OAuth (Recommended) button. This will redirect you to the GitLab website, where you'll need to log in. Once authenticated, you'll be redirected back to Bito, confirming a successful connection.
If you prefer not to use OAuth, you can connect manually using a Personal Access Token.
Once generated, click the Alternatively, use Personal or Group Access Token button.
Now, enter the token into the Personal Access Token input field in Bito.
Click Validate to ensure the token is functioning properly.
If you've successfully connected via OAuth or manually validated your token, you can select your GitLab Group from the dropdown menu.
Click Connect Bito to GitLab to proceed.
After connecting Bito to your GitLab account, you need to enable the AI Code Review Agent for your repositories.
Click the Go to repository list button to view all repositories Bito can access in your GitLab account.
Use the toggles in the Code Review Status column to enable or disable the Agent for each repository.
Once a repository is enabled, you can invoke the AI Code Review Agent in the following ways:
Automated code review: By default, the Agent automatically reviews all new merge requests and provides detailed feedback.
Manually trigger code review: To initiate a manual review, simply type /review
in the comment box on the merge request and submit it. This action will start the code review process.
The AI-generated code review feedback will be posted as comments directly within your merge request, making it seamless to view and address suggestions right where they matter most.
Bito also offers specialized commands that are designed to provide detailed insights into specific areas of your source code, including security, performance, scalability, code structure, and optimization.
/review security
: Analyzes code to identify security vulnerabilities and ensure secure coding practices.
/review performance
: Evaluates code for performance issues, identifying slow or resource-heavy areas.
/review scalability
: Assesses the code's ability to handle increased usage and scale effectively.
/review codeorg
: Scans for readability and maintainability, promoting clear and efficient code organization.
/review codeoptimize
: Identifies optimization opportunities to enhance code efficiency and reduce resource usage.
By default, the /review
command generates inline comments, meaning that code suggestions are inserted directly beneath the code diffs in each file. This approach provides a clearer view of the exact lines requiring improvement. However, if you prefer a code review in a single post rather than separate inline comments under the diffs, you can include the optional parameter: /review #inline_comment=False
Ask questions directly to the AI Code Review Agent regarding its code review feedback. You can inquire about highlighted issues, request alternative solutions, or seek clarifications on suggested fixes.
To start the conversation, type your question in the comment box within the inline suggestions on your merge request, and then submit it. Typically, Bito AI responses are delivered in about 10 seconds. On GitHub and Bitbucket, you need to manually refresh the page to see the responses, while GitLab updates automatically.
Bito supports over 20 languages—including English, Hindi, Chinese, and Spanish—so you can interact with the AI in the language you’re most comfortable with.
and select a workspace to get started.
Navigate to the setup page via the sidebar.
Start by with api
scope in your GitLab account. For guidance, refer to the instructions in the section.
To review additional branches, you can use the . Bito will review merge requests when the source or target branch matches the list.
For more details, refer to .