Gemini Code Assist for GitHub brings the power of Gemini to the pull request process by acting as a code reviewer. Gemini Code Assist for GitHub uses a Gemini-powered agent that automatically summarizes pull requests and provides in-depth code reviews, speeding up reviews and increasing the quality of code.
Once you've set up Gemini Code Assist for GitHub, you can invoke Gemini Code Assist at any stage of the pull request to review the code. You can interact with Gemini Code Assist in the pull request comments directly by:
- Asking clarifying questions on the review that Gemini Code Assist creates.
- Prompting Gemini Code Assist by adding the
/gemini
tag to your comments to ask questions in the context of the pull request.
Gemini Code Assist will automatically retrieve helpful information from the repository and pull request to perform its tasks.
This document is intended for developers of all skill levels. It assumes that you have a working knowledge of GitHub.
Before you begin
To test the steps in this document, make sure you do one of the following:
Get pull request summary and feedback
To get an initial review for a pull request from Gemini Code Assist, create a new pull request.
When you open the new pull request, Gemini Code Assist provides
an initial review. After the review is ready,
gemini-code-assist[bot]
is automatically added as a reviewer to the pull
request. Gemini Code Assist adds an issue comment in the
Conversation tab of the pull request with its feedback, and proceeds to add
comments about modified portions of the code.
Review comments contain the following information:
- Severity of the issue, given as Critical, High, Medium, and Low
- Feedback on the issue
- Code suggestion that can be committed directly from GitHub
- References to a user-provided style guide
Manually invoke Gemini Code Assist
Gemini Code Assist listens to comments from any pull request contributor, and decides whether it should respond.
To manually invoke Gemini Code Assist, you can use the following commands in the main comments page on the pull request as an issue comment.
Command | Description |
---|---|
/gemini summary |
Posts a summary of the changes in the pull request |
/gemini review |
Posts a code review of the changes in the pull request |
/gemini |
Manually invokes Gemini Code Assist in comments |
/gemini help |
Overview of the available commands |
Manage the Gemini Code Assist settings
Anyone with permissions to modify GitHub App settings for the organization can manage the Gemini Code Assist app settings. You can review the permissions provided to the Gemini Code Assist app, manage repository access, and uninstall the Gemini Code Assist app.
To modify the settings, follow these steps:
- On GitHub, click your profile photo and then click Settings.
- In the Integrations section, click Applications. A list of GitHub Apps is displayed.
- Beside Gemini Code Assist, click Configure.