fix(drive): support shared drive uploads#806
Conversation
|
Summary of ChangesHello, 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 an issue where uploading files to Shared Drive folders via the 'gws drive +upload' command would fail due to missing API parameters. By ensuring the 'supportsAllDrives' flag is passed to the Google Drive API, the helper now correctly handles both standard My Drive and Shared Drive destinations, improving the reliability of the CLI for automated workflows. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request adds support for Shared Drives in the Google Workspace CLI drive upload helper. Key changes include the addition of a build_upload_params function that sets the supportsAllDrives parameter to true, updating the execute_method call to include these parameters, and adding a corresponding unit test. Documentation and help text were also updated to reflect this new capability. I have no feedback to provide as there were no review comments.
Summary
supportsAllDrives: truefrom thedrive +uploadhelper to Drivefiles.createWhy
gws drive +upload --parent <shared-drive-folder>currently fails with a Drive 404 because the helper cannot passsupportsAllDrives=true. The rawdrive files create --params ... --upload ...path works, but it defeats the purpose of the helper and makes automation harder. Passing the flag is accepted for regular My Drive folders and required for Shared Drive folders.Fixes #722.
Tests
cargo fmt --checkcargo test -p google-workspace-cli helpers::drive::testscargo check -p google-workspace-cligit diff --check