-
Notifications
You must be signed in to change notification settings - Fork 17
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
Contribute a Gemini Code Assist config #865
Conversation
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.
Hello @devoncarew, 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!
Summary of Changes
I am currently reviewing this pull request. In the meanwhile, I am providing a summary of the content of the pull request for you and other reviewers to get up to speed quickly on the changes that have occurred, and the intent behind these changes.
This pull request contributes a Gemini Code Assist configuration file and a style guide for the dart-lang repository. The configuration disables the initial PR summary from the bot, keeps the code review comment on PR open, and sets the comment severity threshold to medium. The style guide provides a brief overview of coding conventions, referencing Effective Dart and highlighting key points already observed in previous PRs.
Highlights
- Gemini Code Assist Configuration: Adds a
.gemini/config.yaml
file to configure the Gemini Code Assist bot's behavior, disabling the initial PR summary and setting the comment severity threshold. - Style Guide: Adds a
.gemini/styleguide.md
file providing a brief style guide for Dart code contributions, referencing Effective Dart and highlighting key contribution guidelines. - Configuration Changes: The Gemini Code Assist configuration disables the initial PR summary to reduce noise and keeps the code review comment open for ongoing discussions.
Changelog
- .gemini/config.yaml
- Added a configuration file for the Gemini Code Assist bot.
- Disabled the initial PR summary.
- Kept the code review comment on PR open.
- Set the comment severity threshold to MEDIUM.
- .gemini/styleguide.md
- Added a brief style guide for Dart code contributions.
- Referenced Effective Dart style guide.
- Highlighted key contribution guidelines, including discussing significant changes in an issue before creating a PR, following the Dart style guide, adding changelog entries, and including corresponding tests.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 is currently in preview and 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 to provide feedback.
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.
A config file, neat and trim,
Sets Gemini's behavior on a whim.
No summaries grand,
Just reviews at hand,
A style guide to keep code in line, within.
Footnotes
-
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. ↩
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
The pull request introduces a Gemini Code Assist configuration and a basic style guide. The changes look good overall. I've added a few suggestions to improve clarity and consistency.
Summary of Findings
- Clarity in YAML comments: The comments in the
.gemini/config.yaml
file could be more descriptive to explain the purpose of each configuration option. - Style guide link: The style guide link in
.gemini/styleguide.md
could be improved to directly link to the style guide section of the Effective Dart guide.
Assessment
The pull request introduces a Gemini Code Assist configuration and a basic style guide for the dart-lang repository. The configuration disables the initial PR summary and keeps the code review comments open, while the style guide refers to the Effective Dart style guide. Overall, the changes seem reasonable and align with the stated goals. I've provided some minor feedback to improve clarity and consistency. I would recommend addressing these comments before requesting a review from someone else, but feel free to request another review from Gemini via /gemini review
when you have addressed these comments and I'll take another look! Note that I am not authorized to directly approve the pull request, and users should have others review and approve this code before merging.
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. |
Do I need to add a config per repo or there is a way to share a config in the |
The docs I'm going from are https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github. They don't mention anything about looking at the |
That's a great question, parlough! As devoncarew mentioned, the current implementation doesn't support a shared config in the |
# https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github. | ||
|
||
# No poems please. | ||
have_fun: false |
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.
😆
Revisions updated by `dart tools/rev_sdk_deps.dart`. core (https://github.com/dart-lang/core/compare/9f43210..61e6771): 61e67710 2025-03-12 Moritz Check for mandatory when using option (dart-lang/core#871) 77d33c83 2025-03-04 Devon Carew Update publish.yaml (dart-lang/core#870) db610bb5 2025-02-28 Erik Ernst Adjust the implements clause of IntX (dart-lang/core#866) 22d8879f 2025-02-27 Devon Carew [package:lints] fix the changelog (dart-lang/core#867) 2f0325e9 2025-02-26 Devon Carew Contribute a Gemini Code Assist config (dart-lang/core#865) ecosystem (https://github.com/dart-lang/ecosystem/compare/a3cc42d..5b8e6b8): 5b8e6b8 2025-03-17 Devon Carew [dart_flutter_team_lints] remove 'discarded_futures'; prep for publishing (dart-lang/ecosystem#347) b96e5d2 2025-03-14 Devon Carew Add the discarded_futures lint; rev for publishing (dart-lang/ecosystem#346) http (https://github.com/dart-lang/http/compare/001665e..9129a96): 9129a96 2025-03-13 Brian Quinlan Prepare to release cupertino_http 2.1.0 (dart-lang/http#1727) 91d8719 2025-03-13 Brian Quinlan Upgrade to `package:objective_c` 7.0.0 (dart-lang/http#1726) i18n (https://github.com/dart-lang/i18n/compare/b09c822..d9cce0b): d9cce0b 2025-03-13 Moritz Grab new artifacts from version `intl4x-icu-v.0.11.2-artifacts` (dart-lang/i18n#957) protobuf (https://github.com/dart-lang/protobuf/compare/7838e44..0bab78d): 0bab78d 2025-03-14 Devon Carew rename -dev pubspec versions to -wip (google/protobuf.dart#968) tools (https://github.com/dart-lang/tools/compare/9c53358..62bc13b): 62bc13bc 2025-03-17 Kevin Moore [markdown, stream_transform] Fix deprecated usage of pkg:web (dart-lang/tools#2046) f1a5e7a2 2025-03-17 Devon Carew [package:markdown] update package:web references in the example (dart-lang/tools#2039) a4ae1759 2025-03-17 Nate Bosch [package_config] Update language version and reformat (dart-lang/tools#2040) a2af1447 2025-03-17 Nate Bosch [package_config] Remove unnecessary casts to Uint8List (dart-lang/tools#2041) 07ebd15d 2025-03-14 Devon Carew [package:mime] generate a markdown table of the current mime mappings (dart-lang/tools#2038) 920fdb64 2025-03-13 dependabot[bot] Bump dart-lang/setup-dart from 1.7.0 to 1.7.1 in the github-actions group (dart-lang/tools#2022) b55643da 2025-03-13 David Iglesias [html] Allow ampersands in attribute values. (dart-lang/tools#2036) Change-Id: I2998ebecfdc7b1790a74a8ab2128895694658a5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416023 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
Contribute a Gemini Code Assist config:
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.