Skip to content

fix(auth): add gmail.settings.basic scope to auth login picker#832

Open
nuthalapativarun wants to merge 1 commit into
googleworkspace:mainfrom
nuthalapativarun:fix/668-gmail-settings-basic-scope
Open

fix(auth): add gmail.settings.basic scope to auth login picker#832
nuthalapativarun wants to merge 1 commit into
googleworkspace:mainfrom
nuthalapativarun:fix/668-gmail-settings-basic-scope

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Description

Adds gmail.settings.basic scope to the auth login scope picker. This scope is required for users.settings.filters.* commands but was previously missing, causing 403 insufficientPermissions errors for users who authenticated without it.

The scope is suppressed when the full Gmail scope (mail.google.com) is already selected, as it is a strict subset.

Closes #668

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly.
  • I have run cargo clippy -- -D warnings and resolved all warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

🦋 Changeset detected

Latest commit: 86dc1d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 updates the authentication scope configuration to include 'gmail.settings.basic', ensuring that users have the necessary permissions for Gmail filter-related operations. It also includes safety checks to prevent redundant scope requests when full Gmail access is already granted, along with associated test coverage to maintain system reliability.

Highlights

  • Scope Addition: Added the 'gmail.settings.basic' scope to the authentication login picker to support specific Gmail filter management commands.
  • Redundancy Handling: Implemented logic to automatically suppress the 'gmail.settings.basic' scope when the broader 'mail.google.com' scope is already present.
  • Testing: Added comprehensive unit tests to verify the inclusion of the new scope and the correctness of the redundancy filtering logic.
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 the 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 counterproductive. 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.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, 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
Copy Markdown
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 gmail.settings.basic OAuth scope to the Google Workspace CLI, allowing users to select it during authentication. It also configures the scope to be filtered out as redundant if the broader mail.google.com scope is already present, and includes corresponding unit tests to verify this behavior. There are no review comments, so I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gmail.settings.basic scope missing from auth login scope picker — cannot create Gmail filters

2 participants