Code Review Bot
Greptile reviews your pull/merge requests with codebase context-aware comments
Greptile’s code review bot does two things:
Install bot by clicking here
Select the repos you would like the bot to review new PRs on.
Greptile summarizes the changes in the pull/merge request
Greptile comments on specific file changes and suggests potential issues and unforeseen consequences of the change.
Why is it useful?
Greptile’s code review bot writes comments that:
- Summarize the changes with codebase context, making it far easier for a human reviewer to contextualize and parse the changes.
- Are context-aware, so can discuss the implications of the changes to the wider codebase.
- Can identify potential performance,security or compliance issues produced by the changes.
- Reference similar code or abstractions related to the changes that are already in the codebase, to prevent repitition.
- Enforces your custom style guide and prescribed patterns.
This means:
- Less time spent reviewing PRs or awaiting review, and more time spent writing code.
- More bugs caught that humans might miss.
- A human reviewer can focus on the “big picture” and “strategic” aspects of the changes, while the bot can focus on the “tactical” aspects.
Click here to see a sample PR review on twentyhq/twenty
! ->
Installation
Click here to install the PR Review bot.
Trigger
By default, Greptile reviews evert new PR when it is first opened or when a user comments @greptileai
on the PR. It can also be configured to review PRs on certain triggers.
- Trigger only on new PRs withcertain labels.
- Trigger on all new commits pushed to a PR branch.
- Do not trigger on PRs with a certain label or containing some specific keyword in the title or description.
Conversation
You can ask Greptile for fix suggestions or ask follow up questions by replying to its comments in format @greptileai <your question>
.
Reinforcement Learning
Greptile learns from your feedback when you react with 👍
or 👎
to its comments.
Customization
You can customize the bot’s behavior by providing “special instructions” for the bot to follow, for example, “Include a section on compliance implications of the changes in the PR.”
You can also customize the bot’s behavior by selecting certain criterion for the bot to evaluate each diff on, for example syntax issues, or style guide violations.
Per-repo config and patterns repos with greptile.json
You can have custom settings for any repo by adding a greptile.json
file to the root of the repo.
You can grab the your global settings in the correct format here by clicking on the copy
or download
icons on the top right of the Settings panel.
Patterns repos
In the greptile.json
file, you can specify a patternsRepo
field with repos related to the one being reviewed that might add helpful context.
An example is adding a frontend repo to a backend repo’s greptile.json
file so that the bot can reference frontend code when reviewing backend code.
To learn more, see greptile.com/code-review-bot.