Skip to content

Conversation

@joehan
Copy link
Contributor

@joehan joehan commented Aug 4, 2025

Description

Seems like we need this to access the monospace-pa API

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.

Summary of Changes

Hello @joehan, 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!

I've implemented a change to ensure that the necessary userinfo.email OAuth scope is requested when our application is operating within a Firebase Studio environment. This adjustment is crucial for enabling proper access to the monospace-pa API, addressing a dependency identified for its functionality.

Highlights

  • OAuth Scope Addition: I've added the userinfo.email OAuth scope to the list of required scopes when the application is running within a Firebase Studio environment.
  • Conditional Scope Requirement: The userinfo.email scope is now conditionally pushed to the requiredScopes array in src/requireAuth.ts only if isFirebaseStudio() returns true.
  • New Scope Constant: A new constant, USERINFO_EMAIL, has been defined in src/scopes.ts to represent the https://www.googleapis.com/auth/userinfo.email OAuth scope.
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 or fill out our survey to provide feedback.

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 adds the userinfo.email scope when running in Firebase Studio, which is required for accessing the monospace-pa API. The changes are logical and correctly implement the required functionality. I've identified a couple of minor areas for improvement regarding code consistency and redundancy, and have provided suggestions to address them.

Copy link
Contributor

@samedson samedson left a comment

Choose a reason for hiding this comment

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

🚢

joehan and others added 3 commits August 4, 2025 11:38
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@joehan joehan enabled auto-merge (squash) August 4, 2025 18:38
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.76%. Comparing base (f1c2d21) to head (539eb57).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
src/requireAuth.ts 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8935      +/-   ##
==========================================
- Coverage   52.18%   50.76%   -1.43%     
==========================================
  Files         418      497      +79     
  Lines       30694    32952    +2258     
  Branches     6348     6845     +497     
==========================================
+ Hits        16018    16728     +710     
- Misses      13234    14751    +1517     
- Partials     1442     1473      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joehan joehan merged commit 535a658 into master Aug 4, 2025
48 checks passed
@joehan joehan deleted the jh-mo-scopes branch August 4, 2025 18:49
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Aug 4, 2025
joehan added a commit that referenced this pull request Aug 5, 2025
* Fix apptesting enablement (#8905)

* Fix an issue with apptesting enablement

Co-authored-by: Joe Hanley <joehanley@google.com>

* Fix issue where login didnt work as expected on studio (#8914)

* Fix issue where login didnt work as expected on studio

* Update src/commands/login.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* 14.11.2

* [firebase-release] Removed change log and reset repo after 14.11.2 release

* Enable FDC API in `firebase init dataconnect` for Spark projects (#8927)

* feat: address pr comments on app-* commands

* Fetch active Firebase Project from Studio Workspace when running in Studio (#8904)

* Disable broken VSCode integration tests (#8934)

* Add userinfo.email scope when in studio (#8935)

* Add userinfo.email scope when in studio

* Update src/requireAuth.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/requireAuth.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: Display Firestore database edition (#8926)

* feat: Display Firestore database edition

Adds the 'Edition' to the output of the `firestore:databases:get` command.

The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table.

The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`.

* feat: Display Firestore database edition

Adds the 'Edition' to the output of the `firestore:databases:get` command.

The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table.

The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`.

* feat: Display Firestore database edition

Adds the 'Edition' to the output of the `firestore:databases:get` command.

The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table.

The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`.

Also refactors the tests for `prettyPrintDatabase` to improve readability and maintainability.

* feat: Display Firestore database edition

Adds the 'Edition' to the output of the `firestore:databases:get` command.

The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table.

The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`.

Also refactors the tests for `prettyPrintDatabase` to improve readability and maintainability and adds a test case for the `STANDARD` edition.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

* Formatted

---------

Co-authored-by: Jake Ouellette <jakeout@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Google Open Source Bot <firebase-oss-bot@google.com>
Co-authored-by: Fred Zhang <fredzqm@google.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Sam Edson <samedson@google.com>
Co-authored-by: Ehsan <ehsann@google.com>
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.

3 participants