feat(admin): add directory service alias#807
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 enhances the Google Workspace CLI by introducing a dedicated 'admin-directory' alias for the Admin SDK Directory API. This change simplifies common administrative workflows, such as managing users and groups, by removing the need for users to manually specify complex API versions. The update also refines the internal service scope filtering to ensure accurate separation between directory and reporting services. 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 the Google Workspace Admin Directory and Admin Reports services. Key changes include updating the service-to-scope mapping to include 'admin-directory' and 'admin-reports', adding a new service entry for 'admin-directory' in the services registry, and implementing unit tests to verify correct scope matching and service resolution. I have no feedback to provide.
Summary
admin-directoryas a built-in alias for Admin SDK Directory API (admin:directory_v1)admin-reportsmapped toadmin:reports_v1admin.directory.*fromadmin.reports.*Why
Directory workflows like listing users, groups, members, and organizational units currently require knowing to use
admin-reports --api-version directory_v1, which is hard to discover and misleading. A dedicated alias makes common Workspace admin tasks easier to find and use.Fixes #473.
Tests
cargo fmt --checkcargo test -p google-workspace services::tests::test_resolve_service_knowncargo test -p google-workspace-cli scope_matches_admincargo check -p google-workspace-cligit diff --check