Skip to content

fix(gmail): remove duplicate attachment arg on +send#532

Merged
jpoehnelt merged 1 commit intogoogleworkspace:mainfrom
malob:fix/send-attachment-arg
Mar 18, 2026
Merged

fix(gmail): remove duplicate attachment arg on +send#532
jpoehnelt merged 1 commit intogoogleworkspace:mainfrom
malob:fix/send-attachment-arg

Conversation

@malob
Copy link
Contributor

@malob malob commented Mar 18, 2026

Description

The +send subcommand defined its own "attachment" arg (--attachment) in
addition to the "attach" arg (-a/--attach) already provided by
common_mail_args. Since parse_attachments reads "attach", the duplicate
"attachment" arg was dead — +send --attachment file.pdf was silently
accepted by clap but the value was never read.

Removed the dead duplicate and regenerated skills. Introduced in #526.

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 provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: 6e4894a

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

@googleworkspace-bot googleworkspace-bot added area: skills area: core Core CLI parsing, commands, error handling, utilities labels Mar 18, 2026
@gemini-code-assist
Copy link
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 addresses a bug in the +send subcommand where attachments specified via the --attachment argument were not being processed. The issue stemmed from a naming inconsistency, as the parse_attachments function expected an argument named --attach. By removing the defunct --attachment argument, the change ensures that attachments are correctly handled through the --attach argument, thereby improving the reliability and consistency of the +send functionality.

Highlights

  • Duplicate Attachment Argument Removed: The redundant --attachment argument from the +send subcommand was removed. This argument was previously silently ignored due to a mismatch with the parse_attachments function, leading to attachments not being processed.
  • Argument Consistency Ensured: The +send subcommand now consistently uses the --attach argument for file attachments, aligning its behavior with common_mail_args and other related commands like +reply and +forward.
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.

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
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 correctly addresses a bug in the gmail +send command by removing a duplicate --attachment argument. This argument was non-functional as the attachment parsing logic uses the --attach argument provided by common_mail_args. The change is well-executed, removing the dead code from the command definition and updating the corresponding documentation in SKILL.md. A changeset is also included to document the fix. The changes are correct and improve the command's usability by removing a source of confusion.

The +send subcommand defined its own "attachment" arg in addition to the
"attach" arg already provided by common_mail_args. Since parse_attachments
reads "attach", the duplicate "attachment" arg was dead — +send --attachment
was silently accepted by clap but the value was never read.
@malob malob force-pushed the fix/send-attachment-arg branch from 01975c5 to 6e4894a Compare March 18, 2026 06:16
@googleworkspace-bot
Copy link
Collaborator

/gemini review

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 removes a duplicate and non-functional --attachment argument from the gws gmail +send command. The change is correct, as the functionality was already provided by the --attach argument, and the removed argument was never used by the attachment parsing logic. The accompanying documentation changes are also correct. This change cleans up dead code and avoids potential user confusion.

@jpoehnelt jpoehnelt merged commit 1e90380 into googleworkspace:main Mar 18, 2026
26 of 27 checks passed
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.80%. Comparing base (9c26e3c) to head (6e4894a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #532      +/-   ##
==========================================
+ Coverage   68.10%   68.80%   +0.70%     
==========================================
  Files          40       41       +1     
  Lines       17954    18657     +703     
==========================================
+ Hits        12227    12837     +610     
- Misses       5727     5820      +93     

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

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

Labels

area: core Core CLI parsing, commands, error handling, utilities area: skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants