Skip to content

Add CODEOWNERS for ai snippets#816

Open
keyboardsurfer wants to merge 3 commits intomainfrom
bw/aiOwners
Open

Add CODEOWNERS for ai snippets#816
keyboardsurfer wants to merge 3 commits intomainfrom
bw/aiOwners

Conversation

@keyboardsurfer
Copy link
Member

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @keyboardsurfer, 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 establishes clear code ownership for the AI-related snippets directory by updating the CODEOWNERS file. This ensures that changes to these specific files will require review and approval from the designated Android DevRel AI team, streamlining the review process and maintaining code quality for this section of the codebase.

Highlights

  • CODEOWNERS Update: Added a new entry to the CODEOWNERS file, assigning ownership of the /misc/src/main/java/com/example/snippets/ai/ directory to the @android/devrel-ai team.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • CODEOWNERS
    • Added a new ownership rule for the AI snippets directory.
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.

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 a CODEOWNERS entry for AI snippets. The change is functionally correct, but I have one suggestion to improve the file's readability by aligning the new entry with existing ones for consistency.

Copy link
Contributor

@yrezgui yrezgui left a comment

Choose a reason for hiding this comment

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

Can we move the AI snippets to a dedicated module instead of being part of misc

@keyboardsurfer keyboardsurfer requested a review from yrezgui March 2, 2026 11:04
@yrezgui yrezgui enabled auto-merge (squash) March 2, 2026 11:16
@snippet-bot
Copy link

snippet-bot bot commented Mar 11, 2026

Here is the summary of changes.

You are about to add 44 region tags.
You are about to delete 41 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Contributor

@kkuan2011 kkuan2011 left a comment

Choose a reason for hiding this comment

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

Thanks Ben for moving the ai content into its own module, that'll be easier for managing the snippets going forward! I got confused on some of the content in the pR that's not AI-specific if you could clarify, and left some suggestions on making the package name consistent and making the module as bare-bones as possible (reducing # of dependencies, boilerplate files, etc..).

import org.junit.Test;
import static org.junit.Assert.assertFalse;

public class DeviceCompatibilityModeTestJavaSnippets {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this an AI snippet?

}
// [END android_device_compatibility_mode_assert_isLetterboxed_java]


Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we can remove these comments like these since it's implied and remove the extra blank lines too

import org.junit.Rule
import org.junit.Test

class DeviceCompatibilityModeTestKotlinSnippets {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comments in this class as in DeviceCompatibilityModeTestJavaSnippets


package com.example.snippets.navigation

enum class Destination(val route: String, val title: String) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this into the file that uses Destination?

* limitations under the License.
*/

package com.example.snippets;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we specify a more specific pacakge? like com.example.snippets.ai?

See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:window="http://schemas.android.com/apk/res-auto">
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove this file?

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<permission android:name="com.example.snippets.CUSTOM_PERMISSION"/>

<!--[START android_broadcast_receiver_10_manifest_permission]-->
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need these region tags in the manifest file? we generally discourage doing so, and just hardcode any manifest snippets in the markdown file


android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "com.example.snippets"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we pick a more specific name to ai?

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this proguard file deprecated now? can we remove it?

}

}
dependencies {
Copy link
Contributor

Choose a reason for hiding this comment

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

are all these dependencies needed for the ai module? can we omit the ones that are not needed?

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.

3 participants