The AI Code Review Agent is a tool that automatically reviews code in your GitHub pull requests (PRs). It identifies potential issues, suggests improvements, and enforces coding standards. This helps save time and effort during code reviews and ensures high-quality code.
In this blog post, I will guide you through setting up the Agent on Bito Cloud, a hassle-free solution that requires no downloads.
What you’ll need
- A GitHub repository.
- A Bito 10X Developer plan subscription (free 14-day trial available).
What you’ll learn
- How to connect your GitHub repository to Bito’s AI Code Review Agent.
- How to use the AI Code Review Agent.
Connect GitHub repo with Agent
Create an Agent instance in Bito Cloud
- Log in to Bito Cloud and select your workspace that has an active Bito 10X Developer plan subscription.
- From the left sidebar, navigate to Explore Agents. Here you will see Code Review Agent.
- Simply click on the Create New Instance button to open a form where you have to enter a few details, such as:
- Select Git Provider (in our case please select “GitHub”)
- Enter GitHub Access Token. You can generate this token inside GitHub. For assistance, please refer to this guide.
- Enter a unique name and short description for easy identification.
- Click Save & view setup instructions button to proceed.
Add a webhook in your GitHub repository
A GitHub webhook is required to integrate your repository with the AI Code Review Agent. Basically, this connection allows the Agent to analyze code in your pull requests and provide its feedback.
- Copy the Payload URL and Secret token from setup instructions page in Bito Cloud.
- Now open your GitHub repository’s settings and create a new webhook.
- In the webhook creation form, please enter these details:
- Paste the copied Payload URL and Secret token.
- In Content type select application/json.
- Under “Which events would you like to trigger this webhook?”, please click on Let me select individual events and then select Issue comments and Pull requests.
- To make the webhook active immediately after adding the configuration, select Active.
- Click Add webhook.
Note: You can also follow this step-by-step guide on how to create a webhook.
How to use the AI Code Review Agent?
After connecting your GitHub repository with the Agent, all new pull requests will be automatically reviewed upon creation. To initiate a code review manually, simply type /review
in the comment box of the pull request and submit it.