Skip to content

feat(services): register Apps Script and Google Photos APIs#544

Open
dumko2001 wants to merge 4 commits intogoogleworkspace:mainfrom
dumko2001:feat/apps-script-photos-registrations-v2
Open

feat(services): register Apps Script and Google Photos APIs#544
dumko2001 wants to merge 4 commits intogoogleworkspace:mainfrom
dumko2001:feat/apps-script-photos-registrations-v2

Conversation

@dumko2001
Copy link
Contributor

@dumko2001 dumko2001 commented Mar 18, 2026

Description

Formally register the Apps Script (script) and Google Photos (photos) APIs in the built-in services list. This enables users to access these services using short aliases and ensures that the correct OAuth scopes are included in the login flow picker.

Fixes #163, #205

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

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: bee9754

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

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
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 enhances the system's capabilities by integrating two new Google services, Apps Script and Google Photos, into the core service registry. This integration streamlines the process for users to interact with these APIs, providing convenient aliases and ensuring that the necessary authentication scopes are correctly managed during the login procedure.

Highlights

  • API Registration: Formally registered the Apps Script (script) and Google Photos (photos) APIs within the built-in services list.
  • User Access: Enabled users to access these services using short aliases and ensured correct OAuth scopes are included in the login flow picker.
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 registers the Apps Script and Google Photos APIs, allowing them to be used with short aliases. The change is a straightforward addition to the list of known services. My review identifies that tests for the new services are not included, despite being indicated on the PR checklist. Adding these tests would improve maintainability and prevent future regressions.

Comment on lines +129 to +140
ServiceEntry {
aliases: &["script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},
ServiceEntry {
aliases: &["photos"],
api_name: "photoslibrary",
version: "v1",
description: "Manage Google Photos library",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The PR checklist indicates that tests have been added, but no tests for these new services are present in the diff. To prevent regressions and ensure correct service resolution, please add test cases for script and photos to the test_resolve_service_known function.

For example:

assert_eq!(
    resolve_service("script").unwrap(),
    ("script".to_string(), "v1".to_string())
);
assert_eq!(
    resolve_service("photos").unwrap(),
    ("photoslibrary".to_string(), "v1".to_string())
);

@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 registers the Apps Script and Google Photos APIs, allowing them to be used with short aliases. The changes are correct, but they are missing corresponding unit tests to verify that the new service aliases resolve correctly. Adding these tests is important to ensure the feature works as expected and to prevent future regressions.

Comment on lines +129 to +140
ServiceEntry {
aliases: &["script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},
ServiceEntry {
aliases: &["photos"],
api_name: "photoslibrary",
version: "v1",
description: "Manage Google Photos library",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The contribution checklist states that tests have been added, but there are no new tests in test_resolve_service_known to verify that the new script and photos aliases resolve correctly. Please add test cases for these new services to prevent regressions.

For example, you could add the following to the test:

assert_eq!(
    resolve_service("script").unwrap(),
    ("script".to_string(), "v1".to_string())
);
assert_eq!(
    resolve_service("photos").unwrap(),
    ("photoslibrary".to_string(), "v1".to_string())
);

@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 registers the Apps Script and Google Photos APIs, allowing them to be used with short aliases. The change is straightforward, but it's missing corresponding tests to verify that the new services are resolved correctly, which contradicts the PR checklist. Additionally, the new services are not added in alphabetical order, which impacts maintainability. Please address these points to improve the quality of the change.

Comment on lines +129 to +140
ServiceEntry {
aliases: &["script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},
ServiceEntry {
aliases: &["photos"],
api_name: "photoslibrary",
version: "v1",
description: "Manage Google Photos library",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

high

There are a couple of issues with this addition:

  1. Missing Tests: The PR checklist is marked as having tests, but no tests were added for the new script and photos services. Please add assertions to test_resolve_service_known to verify that the new aliases resolve correctly.

  2. Alphabetical Order: For maintainability and a better user experience in help messages, the SERVICES list should be kept sorted alphabetically. photos should be listed before script.

Here's a suggestion to fix the ordering:

Suggested change
ServiceEntry {
aliases: &["script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},
ServiceEntry {
aliases: &["photos"],
api_name: "photoslibrary",
version: "v1",
description: "Manage Google Photos library",
},
ServiceEntry {
aliases: &["photos"],
api_name: "photoslibrary",
version: "v1",
description: "Manage Google Photos library",
},
ServiceEntry {
aliases: &["script"],
api_name: "script",
version: "v1",
description: "Manage Apps Script projects and deployments",
},

@dumko2001
Copy link
Contributor Author

Alphabetized the entire SERVICES list for better maintainability and added unit tests to verify that the new photos and script aliases resolve correctly, as suggested in review.

@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 adds new service registrations for the Google Photos API (photoslibrary) and the Apps Script API (script) to the SERVICES constant array in src/services.rs. The existing service entries in this array were also reordered. Corresponding unit tests were added to verify the correct resolution of these new services, and a new changeset file was created to document this feature.

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.

Any plan to support Google Photos?

2 participants