Skip to content

Update API Executable Example to use deploymentId instead of scriptId#1750

Open
vineetsahu-boop wants to merge 1 commit intogoogleworkspace:mainfrom
vineetsahu-boop:main
Open

Update API Executable Example to use deploymentId instead of scriptId#1750
vineetsahu-boop wants to merge 1 commit intogoogleworkspace:mainfrom
vineetsahu-boop:main

Conversation

@vineetsahu-boop
Copy link

Update scripts.run documentation to use deploymentId instead of scriptId.

The scripts.run method now requires a deploymentId in the request path and path parameters, replacing the previous use of scriptId. The description for finding the ID has also been updated.

Description

Update sample code to use deploymentId instead of scriptId.

The run method now requires a deploymentId in the request path and path parameters, replacing the previous use of scriptId. The description for finding the ID has also been updated.

Fixes # (issue)

Is it been tested?

  • Development testing done

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have performed a peer-reviewed with team member(s)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Update `scripts.run` documentation to use `deploymentId` instead of `scriptId`.

The `scripts.run` method now requires a `deploymentId` in the request path and path parameters, replacing the previous use of `scriptId`. The description for finding the ID has also been updated.
@gemini-code-assist
Copy link

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 sample code for the Google Apps Script API to align with a recent change in the scripts.run method. It ensures that the provided example correctly uses the new deploymentId parameter, enhancing the accuracy and usability of the code for developers integrating with the API.

Highlights

  • API Parameter Update: The scripts.run method now requires deploymentId instead of scriptId in its request path and parameters, reflecting an API change.
  • Sample Code Alignment: The Execute.java sample code has been updated to use deploymentId and its associated documentation comments have been revised to guide users on finding the correct ID.
Changelog
  • appsScript/execute/src/main/java/Execute.java
    • Updated the variable name from scriptId to deploymentId.
    • Modified the service.scripts().run() method call to pass deploymentId.
    • Revised inline comments to reflect the change from scriptId to deploymentId and guide users on how to acquire the correct ID.
Activity
  • Author performed development testing.
  • Author confirmed adherence to project style guidelines.
  • Author performed a self-review of the code.
  • Author made corresponding changes to the documentation.
  • Author confirmed no new warnings were generated by the changes.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@vineetsahu-boop vineetsahu-boop changed the title Update API Executable Update API Executable Example to use deploymentId instead of scriptId Mar 5, 2026
Copy link

@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 updates the sample code to use deploymentId instead of scriptId for executing an Apps Script, aligning with a recent API change. The changes are straightforward and reflect the description. I have included one review comment regarding comment formatting to enhance readability, adhering to the project's style guidelines.

Comment on lines +99 to +100
// Deployment ID of the script to call. Acquire this from
// the Apps Script editor, under Publish > Deploy as API executable.

Choose a reason for hiding this comment

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

high

The line wrapping in this comment is awkward and there is a trailing space on line 99, which harms readability. The repository's style guide prefers the Google Java Style Guide, which emphasizes code readability. I suggest re-wrapping the comment for better clarity.

Suggested change
// Deployment ID of the script to call. Acquire this from
// the Apps Script editor, under Publish > Deploy as API executable.
// Deployment ID of the script to call. Acquire this from the Apps Script editor,
// under Publish > Deploy as API executable.
References
  1. The repository style guide (line 7) states a preference for Google's style guides, which prioritize code readability and consistent formatting. The current comment wrapping and trailing whitespace do not align with these best practices. (link)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant