Skip to content

Conversation

@shrutip90
Copy link
Collaborator

TLDR

Added tests for no auth method, Gemini API key, Vertex AI auth(non express mode), and for 'Login with Google' to test that it triggers browser request and that it uses cached creds if available.

Dive Deeper

Reviewer Test Plan

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Related to #6787

@shrutip90 shrutip90 requested a review from a team as a code owner October 14, 2025 19:08
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @shrutip90, 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 robustness of the CLI's authentication mechanisms by introducing a new set of integration tests covering various authentication flows. It also refines the testing infrastructure to better support interactive authentication scenarios and centralizes the management of OAuth credential paths, making the system more configurable and testable.

Highlights

  • New Authentication Integration Tests: Added a comprehensive suite of integration tests for various authentication methods, including scenarios for no authentication, Gemini API key, Vertex AI, and 'Login with Google' with both cached and non-cached credentials.
  • Enhanced Interactive Test Helper: Modified the runInteractive method in the test rig to include a waitForReady option, allowing tests to control whether the interactive process waits for the initial 'Type your message' prompt. This is crucial for testing scenarios where a different prompt, such as an authorization code request, is expected.
  • Configurable OAuth Credential Path: Introduced the ability to override the OAuth credentials file path using the GEMINI_OAUTH_CREDS_PATH environment variable. This centralizes the logic for determining the path and provides greater flexibility for testing and deployment.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable set of integration tests for various authentication flows, which is a great addition for ensuring the CLI's robustness. The supporting changes in the test helper and core storage logic are well-contained and enable this new test coverage. I've identified one high-severity issue in the new test file that could cause test flakiness, which I've detailed in a specific comment.

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

Size Change: -28 B (0%)

Total Size: 17.9 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.9 MB -28 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

@shrutip90 shrutip90 requested review from jacob314 and mattKorwel and removed request for jacob314 October 14, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant