Install/run Using Bito Cloud
Deploy the AI Code Review Agent in Bito Cloud.
Last updated
Deploy the AI Code Review Agent in Bito Cloud.
Last updated
Bito Inc. (c) 2024
Bito Cloud offers a single-click solution for using the AI Code Review Agent, eliminating the need for any downloads on your machine. You can create multiple instances of the Agent, allowing each to be used with a different repository on a Git provider such as GitHub, GitLab, or Bitbucket.
We also support GitHub Enterprise (self-hosted) and GitLab (self-hosted).
You need a Bito 10X Developer paid plan to get started. For more information about costs, please visit our Pricing Page.
Guide for GitHub: Watch the step-by-step guide for setting up Bito's AI Code Review Agent on GitHub.
Guide for GitLab: Watch the step-by-step guide for setting up Bito's AI Code Review Agent on GitLab.
Guide for Bitbucket: Watch the step-by-step guide for setting up Bito's AI Code Review Agent on Bitbucket.
Follow the step-by-step instructions below to install the AI Code Review Agent using Bito Cloud:
Before proceeding, ensure you've completed all necessary prerequisites for Bito Cloud.
Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.
From the left sidebar, click on the "Explore Agents" menu to view all available Agents for installation.
Currently, we only offer the AI Code Review Agent. More dev agents are coming soon.
Find the Code Review Agent in the list and click the "Create New Instance" button.
Configure Agent:
Select Git Provider: Choose from GitHub.com, GitHub Enterprise (self-hosted), GitLab.com, GitLab (self-hosted), or BitBucket in the dropdown menu.
Note: When configuring the Agent for GitHub Enterprise (self-hosted) or GitLab (self-hosted), please whitelist all of Bito's gateway IP addresses in your firewall to ensure Bito has access to your self-hosted repository. The agent response can come from any of these IPs.
List of IP addresses to whitelist:
18.188.201.104
3.23.173.30
18.216.64.170
Enter GitHub/GitLab (self-hosted) URL: If you selected GitHub Enterprise (self-hosted) from the Git provider dropdown mentioned above, you must enter the GitHub Enterprise (self-hosted) URL. Similarly, if you selected GitLab (self-hosted) from the Git provider dropdown, you must enter the GitLab external URL.
Note: This input field will only appear for self-hosted GitHub/GitLab.
Supported versions:
GitHub Enterprise (self-hosted): 3.0 and above
GitLab (self-hosted): 15.5 and above
Enter Git Access Token: Generate a Git Access Token from your Git provider (i.e. GitHub, GitLab, or BitBucket). For assistance, refer to the guide in the Required Access Tokens section.
Agent Actions: This section contains all the actions that the AI Code Review Agent can perform. The Agent can execute these actions as part of a workflow or manually.
/review
command: Initiate a manual code review by commenting /review
on a pull request. It provides separate code suggestions for each detected issue below the code diffs.
Additionally, you can pass an optional parameter like /review #inline_comment=False
to get code review in a single post.
Agent instance details: In this section, you can set the name and description of your Agent instance.
Instance Name: Assign a unique alphanumeric identifier for your instance. You can invoke the agent in supported clients using @<instance_name>
command.
Instance Description: Provide a brief description of the specific use case or project where this AI Code Review Agent instance will be deployed. This description will help you easily identify and manage it among multiple instances.
Filters: Exclude specific files and folders from code reviews or skip automated reviews for selected Git branches. For more information and examples, see Excluding Files, Folders, or Branches with Filters.
Files and folders: A list of files/folders that the AI Code Review Agent will not review if they are present in the diff. You can specify the files/folders to exclude from the review by name or glob/regex pattern. The Agent will automatically skip any files or folders that match the exclusion list. This filter applies to both manual reviews initiated through the /review
command and automated reviews triggered via webhook.
Source or Target branch: This filter allows users to skip automated reviews for pull requests based on the source or target branch. It is useful in scenarios where automated reviews are unnecessary or could potentially disrupt the workflow. This filter applies only to automatically triggered reviews. Users should still be able to trigger reviews manually via the /review
command.
Draft pull requests: A toggle switch that controls the automated review of pull requests (PR) based on their draft status. The default setting is enabled (turned on), which means automated review is skipped for draft pull requests.
Save Configuration: Click "Save & view setup instructions" to complete the installation and access detailed instructions on configuring the new Agent instance with your repository using webhook.
Add Webhook:
You will be directed to a page that provides a webhook payload URL and a secret key for setting up webhooks in GitHub, GitLab, or Bitbucket, along with a comprehensive step-by-step guide. Follow that guide to ensure a successful integration of AI Code Review Agent with your repository.
Additionally, we have provided a step-by-step guide below to help you add a webhook in GitHub and GitLab.
Login to your GitHub account.
Navigate to the main page of the repository. Under your repository name, click Settings.
In the left sidebar, click Webhooks.
Click Add webhook.
Copy the Payload URL from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitHub, and in Payload URL input field, paste the URL of the webhook endpoint you've just copied. This unique Webhook URL, provided by Bito Cloud, is designed to receive webhook payloads.
Select the Content type “application/json” for JSON payloads.
Copy the Secret token from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitHub, and in Secret token input field, paste the webhook secret token you've just copied. The Secret token is used to validate payloads.
Click on Let me select individual events to select the events that you want to trigger the webhook. For code review select these:
Issue comments - To enable Code Review on-demand by issuing a command in the PR comment.
Pull requests - To auto-trigger Code Review when a pull request is created.
Pull request review comments - So, you can share feedback on the review quality by answering the feedback question in the code review comment.
To make the webhook active immediately after adding the configuration, select Active.
Click Add webhook.
Login to your GitLab account.
Select the repository where the webhook needs to be configured.
On the left sidebar, select Settings > Webhooks.
Select Add new webhook.
Copy the Webhook URL from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitLab, and in URL input field, paste the URL of the webhook endpoint you've just copied. This unique Webhook URL, provided by Bito Cloud, is designed to receive webhook payloads.
Copy the Secret token from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitLab, and in Secret token input field, paste the webhook secret token you've just copied. The Secret token is used to validate payloads.
In the Trigger section, select the events to trigger the webhook. For code review select these:
Comments - for on-demand code review.
Merge request events - for automatic code review when a merge request is created.
Emoji events - So, you can share feedback on the review quality using emoji reactions.
Select Add webhook.
BitBucket Webhook Setup Guide:
Login to your BitBucket account.
Select the repository where the webhook needs to be configured.
On the left sidebar, select Repository Settings > Webhooks.
Select Add webhook.
Copy the Webhook URL from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in BitBucket, and in URL input field, paste the URL of the webhook endpoint you've just copied. This unique Webhook URL, provided by Bito Cloud, is designed to receive webhook payloads.
Copy the Secret token from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in BitBucket, and in Secret token input field, paste the webhook secret token you've just copied. The Secret token is used to validate payloads.
In the Triggers section, select the events to trigger the webhook. For code review select these:
Pull Request > Comment created - for on-demand code review.
Pull Request > Created - for automatic code review when a pull request is created.
Pull Request > Updated - for incremental code review.
Pull request > Merged - for evaluating if the issues found by the Bito agent were fixed.
Pull request > Declined - for evaluating if the issues found by the Bito agent were fixed.
Select Save.
After configuring the webhook, you can invoke the AI Code Review Agent in the following ways:
Note: To improve efficiency, the AI Code Review Agent is disabled by default for pull requests involving the "main" branch. This prevents unnecessary processing and token usage, as changes to the "main" branch are typically already reviewed in release or feature branches. To change this default behavior and include the "main" branch, please contact support.
The AI Code Review Agent automatically reviews code changes up to 5000 lines when a pull request is created. For larger changes, you can use the /review
command.
Automated Code Review: If the webhook is configured to be triggered on the Pull requests event (for GitHub), Merge request event (for GitLab), or Pull Request > Created event (for Bitbucket), the agent will automatically review new pull requests as soon as they are created and post the review feedback as a comment within your PR.
Manually Trigger Code Review: To start the process, simply type /review
in the comment box on the pull request and submit it. If the webhook is configured to be triggered on the Issue comments event (for GitHub), Comments event (for GitLab) or Pull Request > Comment created event (for Bitbucket), this action will initiate the code review process. The /review
command prompts the agent to review the pull request and post its feedback directly in the PR as a comment.
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
For more details, refer to Available Commands.
It may take a few minutes to get the code review posted as a comment, depending on the size of the pull request.
AI-generated pull request (PR) summary
Changelist showing key changes and impacted files in a pull request.
AI code review feedback posted as comments on the pull request.
Quickly create a new Agent instance by duplicating the configuration settings of an existing one. Follow the steps below:
Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.
From the left sidebar, select Configured Agents > Code Review Agent.
A list of AI Code Review Agent instances configured in your workspace will appear. Locate the instance you wish to duplicate and click the "Clone" button.
An edit form will open, pre-populated with the input field values. You can edit these values as necessary and then proceed to follow the installation guide mentioned above to install the new Agent instance.
When you save the configuration, your new agent instance will be added and available on the Configured Agents > Code Review Agent page.
You can delete an agent instance if you no longer use it. Follow the steps below:
Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.
From the left sidebar, select Configured Agents > Code Review Agent.
A list of AI Code Review Agent instances configured in your workspace will appear. Locate the instance you wish to delete and click the "Delete" button.
A warning popup will appear; select "Yes" to confirm and proceed with the deletion of the agent instance.