Repository navigation
Add functionality to check for git extension updates, as well as support for installing a specific ref - #8018
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @jakemac53, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly improves the management of Git-based extensions by providing more granular control over their installation and introducing proactive update notifications. Users can now specify exact Git references (like branches or tags) and subdirectories when installing extensions, which supports more flexible release strategies and monorepo setups. Additionally, the system will now automatically check for available updates for installed Git extensions upon startup, ensuring users are aware of new versions without requiring manual checks.
Highlights
- Enhanced Git Extension Installation: Introduces
--refand--subpathoptions forgemini extensions install, allowing installation from specific Git branches/tags and subdirectories within a repository. - Automatic Extension Update Checks: Implements an automatic, lightweight check for Git extension updates on application startup, notifying users if a newer commit is available on the remote.
- Improved Extension Metadata Display: Enhances the extension installation metadata and display to include
refandsubpathinformation for better clarity.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
As a follow-up to this PR I would like to add a setting to just auto-update in the background, but I think it should be a default disabled setting just because of potential security concerns. |
There was a problem hiding this comment.
Code Review
This pull request introduces valuable new features for managing git-based extensions, including installation from specific refs and subpaths, and a non-intrusive check for updates on startup. The implementation is solid, with good test coverage for the new functionality. I've identified one critical bug in an error message string that needs to be fixed. Overall, this is a great enhancement to the CLI's extension management capabilities.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Size Change: +677 B (+0.01%) Total Size: 13.2 MB ℹ️ View Unchanged
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Thank you so much-- this is overall great. One overarching thought: what happens if there are, say, 1000 extensions that need to be updated and those events are coming in while the user sending/receiving messages-- will the messages get added in the middle of the conversation? I think we should add a UI component that can be expanded if needed. We can also prompt users to run 'gemini extensions update --all' to update all update-able extensions if there are multiple. What if we for updates in the background and then write them to a user-level file (e.g., We can also store info about auto-updated extensions in that file. |
Yes - the way this is implemented each extension will add its own separate message, and they are added to the regular chat history, so they will appear below the last message in the chat, when the update notification comes in. |
How do you feel about doing this as a follow up? People should not have a lot of extensions right now, and I think this PR gives a good base to build off of? I just think that adding the auto-update functionality + |
|
Updated this to just have the core logic but not do any UX around it, we are planning on a more stateful UX and not something event driven. |
…ort for installing a specific ref (#8018) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…updates, as well as support for installing a specific ref (google-gemini#8018)
…ort for installing a specific ref (google-gemini#8018) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ort for installing a specific ref (#8018) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

TLDR
Adds support for installing by specific git refs, and checking for updates to git installed extensions. This allows for instance an extension to do releases by updating a specific ref (branch or tag). So you can install the "stable" branch of an extension for instance, if they maintain a branch or tag pointing to a specific commit for that release channel.
Note that this is done without actually cloning the repo, just comparing remote refs, so we don't actually know the version number. But I think it is a good tradeoff for doing it cheaply.
Note also that if you explicitly install a specific version or hash, it will effectively bypass this update check, but I think that is a feature. You opted into installing at that exact version/hash, we shouldn't bug you about it.
Reviewer Test Plan
Run the tests
Testing Matrix
Linked issues / bugs
First part of #7009
Half of #7808 (implements ref support but not subpath support)