-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(dataconnect): Update dataconnect:* commands to use flags for --service & --location #9312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
…onfiguration. (#9300) Co-authored-by: Jamie Rothfeder <[email protected]>
* feat(dataconnect): add confirmation for Gemini schema generation
Instead of directly asking for an app description to generate a schema with Gemini, this change first asks the user to confirm if they want to use Gemini.
If the user confirms, it then prompts for the app description with a default value of "an app for ${setup.projectId}".
* prompts
* changelog
* m
* feedback
* typo
* metrics
* Update index.ts
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Updated all `dataconnect:*` commands that previously used a positional argument for the service ID to use `--service` and `--location` flags instead. This change improves the usability and consistency of the CLI. The following commands were updated: - `dataconnect:sql:migrate` - `dataconnect:sql:diff` - `dataconnect:sdk:generate` - `dataconnect:sql:grant` - `dataconnect:sql:setup` - `dataconnect:sql:shell` The `pickService` and `loadAll` functions in `src/dataconnect/load.ts` were also updated to support filtering by location.
Summary of ChangesHello @fredzqm, 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 refactors the argument parsing for all 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 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 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
|
There was a problem hiding this 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 is a great step towards improving the usability and consistency of the dataconnect:* commands by transitioning from positional arguments to flags. The changes are well-implemented across all the modified command files. My review includes a few suggestions to further enhance the code. I've recommended using commander's requiredOption for mandatory flags to make the code more idiomatic and consistent. Additionally, I've suggested an improvement to an error message to provide better context to the user when a location filter is applied.
|
/gemini review |
There was a problem hiding this 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 refactors the dataconnect:* commands to use --service and --location flags instead of positional arguments, which is a great improvement for usability and consistency. The changes in src/dataconnect/load.ts to introduce pickServices and pickOneService are well-structured.
I've added a few suggestions to improve error messages, enhance type safety in command actions, and fix a minor typo in tool descriptions. These changes should improve code clarity and maintainability.
Updated all
dataconnect:*commands that previously used a positional argument for the service ID to use--serviceand--locationflags instead.This change improves the usability and consistency of the CLI.
The following commands were updated:
dataconnect:sql:migratedataconnect:sql:diffdataconnect:sdk:generatedataconnect:sql:grantdataconnect:sql:setupdataconnect:sql:shellThe
pickServiceandloadAllfunctions insrc/dataconnect/load.tswere also updated to support filtering by location.Description
Scenarios Tested
Sample Commands