Skip to content

Conversation

daymxn
Copy link
Member

@daymxn daymxn commented Oct 14, 2025

Per b/450976183,

This adds a generic command for SDK teams to decrypt their secret files for integration tests. Note that I also (locally) have subcommands for encrypt and run, but have not included those in this PR to keep the diff small.

More broadly, this PR introduces a new swift package called repo which is intended to be a point of migration for our larger bash scripts that are harder to maintain in bash form. Currently, it only includes the tests target for integration tests, but it's intended to be expanded upon as we deem necessary. The main point of this PR is to discuss whether we find this valuable or not. I felt it would be easier to integrate the generic commands for testing if I could take advantage of ArgumentParser, which led me to the idea of centralizing our larger bash scripts here. @ncooke3 greenlit the idea, but also felt it would be worth having further discussion in the PR.

As far as the specifics on decrypt, I have expanded it from #15398 to be more generic. You can now call it inline with generic parameters specifying the secret files and passphrase, or use a predefined JSON file to specify the secrets, and defer to an environment variable for the passphrase. You can also toggle the overwrite behavior (whether to leave existing decrypted files alone, or overwrite them).

Example usage of doing everything inline:

./scripts/repo tests decrypt --password "super_secret" \
  scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info.plist.gpg:FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist \
  scripts/gha-encrypted/FirebaseAI/TestApp-GoogleService-Info-Spark.plist.gpg:FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist

Example usage of using a JSON file and an environment variable for the passphrase:

./scripts/repo tests decrypt --json ./scripts/secrets/AI.json

#no-changelog

@daymxn daymxn self-assigned this Oct 14, 2025
Copy link
Contributor

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

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.

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

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

I like this. It does add a lot more code than the current decryption approach, but it's easier to fine tune in Swift than bash (IMO) and this will hopefully scale better with additional subcommands (build, etc.).

@daymxn daymxn merged commit fcf18dc into main Oct 17, 2025
33 checks passed
@daymxn daymxn deleted the dlr/generic-test-script branch October 17, 2025 16:50
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.

2 participants