Review GitHub code using Gemini Code Assist

  • Gemini Code Assist on GitHub uses a Gemini-powered agent to automatically summarize pull requests and provide in-depth code reviews.

  • You can interact with Gemini Code Assist in pull request comments by asking clarifying questions or using the /gemini tag to ask questions in the context of the pull request.

  • Gemini Code Assist on GitHub is available in a consumer version installed directly in GitHub and an enterprise version installed through Google Cloud, with differences in setup, terms of service, quotas, and configuration options.

  • Once set up, Gemini Code Assist provides an initial review when a new pull request is created, and you can also manually invoke it using commands like /gemini summary or /gemini review.

Gemini Code Assist on GitHub brings the power of Gemini to the pull request process by acting as a code reviewer. Gemini Code Assist on 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 on 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.

Consumer version and enterprise version

Gemini Code Assist on GitHub is available in a consumer version, which you install directly in GitHub, and an enterprise version, which you install through Google Cloud.

The following table summarizes the differences between the consumer version and enterprise version:

Consumer version Enterprise version (Preview)
Setup Directly in GitHub Managed through Google Cloud
Terms of service Google terms of service Google Cloud terms of service
Quotas 33 pull requests per day 100+ pull requests per day
Adding a style guide Per-repository within GitHub

Per-repository within GitHub

Across multiple repositories using Google Cloud

Managing configurations

Per-repository within GitHub

All repositories associated with an account using the settings page

Per-repository within GitHub

Across multiple repositories using Google Cloud

GitHub support

GitHub

GitHub

GitHub Enterprise Server

GitHub Enterprise Cloud

Considerations

  • Gemini Code Assist on GitHub does not generate summaries or code suggestions for any files located within the .github/workflows directory. This exclusion helps prevent the introduction of potentially insecure configurations to the repository.

  • The enterprise version uses a Developer Connect connection to connect your GitHub repositories to Google Cloud.

    • This Developer Connect connection is always created in the region us-east1.

    • This Developer Connect connection must be created using the Code Assist Source Code Management section found in Gemini Code Assist Agents & Tools. For instructions, see Set up Gemini Code Assist on GitHub.

What's next