-
Notifications
You must be signed in to change notification settings - Fork 209
feat(workflows): refactor examples/workflows to use dispatch pattern #242
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
Conversation
|
🤖 Hi @jerop, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
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.
📋 Review Summary
This pull request is a significant and well-executed refactoring of the GitHub Actions workflows. The introduction of the gemini-dispatch workflow simplifies the design, reduces duplication, and improves extensibility. The updated documentation and prompts are excellent, providing clear guidance and a robust operational framework.
🔍 General Feedback
- The move to a centralized dispatch model is a great improvement for maintainability and scalability.
- The new prompts are well-defined, with a strong focus on security and a clear, structured workflow for the AI assistant.
- The documentation updates are comprehensive and will be very helpful for users.
- There are a few minor inconsistencies in the use of
google_api_keyacross the new workflows, which I've highlighted in the inline comments.
613cad1 to
efc9b98
Compare
This commit refactors the GitHub Actions workflows to use a central dispatch model and significantly improves the documentation. The `gemini-dispatch` workflow is introduced to act as a single entry point, routing commands to the appropriate reusable workflow (`review`, `triage`, or `invoke`). This simplifies the overall design, reduces code duplication, and makes the system more extensible. Key changes: - **New `gemini-dispatch` workflow:** - Acts as a central router for all incoming requests. - Determines which workflow to call based on the event type and comment commands. - **Refactored Reusable Workflows:** - `gemini-invoke.yml`, `gemini-scheduled-triage.yml`, `gemini-triage.yml`, and `gemini-review.yml` are now `workflow_call` workflows. - Simplified context gathering by relying on inputs from the dispatch workflow. - **Improved Prompts:** - The prompts for all workflows have been rewritten to be more persona-driven, secure, and structured. - They now include detailed instructions, security constraints, and a clear operational workflow for Gemini CLI GitHub Actions. - **Documentation Updates:** - Added a `README.md` for the new `gemini-dispatch` workflow. - Updated all workflow `README.md` files to reflect the new dispatch system, including dependencies and setup instructions. - Added instructions on how to extend the dispatch workflow with custom commands. - Updated the main `README.md` and the `examples/workflows/README.md` to include the new `gemini-dispatch` workflow.
efc9b98 to
dfa96ee
Compare
## What's Changed * fix(output): separate the stdout and stderr logs by @sethvargo in #186 * fix: correct step numbering in setup_workload_identity.sh by @jasmeetsb in #188 * Try and address TOCTOU issues in gemini-cli.yml by @sethvargo in #187 * chore: bump `actions/checkout` GitHub Actions by @Marukome0743 in #193 * docs: add gitignore recommendations across all workflows by @jerop in #198 * chore: bump `actions/create-github-app-token` from 2.0.6 to 2.1.1 by @Marukome0743 in #200 * bug(output): do not print output by default by @sethvargo in #202 * Add GOOGLE_API_KEY variable by @vivekkairi in #201 * Stream live output if (and only if) debug mode is enabled by @sethvargo in #207 * bug(debug): use `vars` (not `env`) when enabling debug mode by @sethvargo in #211 * feat: Add GEMINI_MODEL support by @vivekkairi in #214 * feat(actions): use the dispatcher pattern to separate concerns by @sethvargo in #212 * bug(ci): set id-token permissions by @sethvargo in #223 * chore: add a debugger by @sethvargo in #226 * Add release notes generation example in awesome list by @jerop in #225 * feat(invoke): update invoke prompt to better separate execution flow by @sethvargo in #227 * chore(ci): refactor scheduled triage workflow by @sethvargo in #232 * Fix triage workflow by @sethvargo in #233 * Auto trigger PR reviews when they are from branches in repo by @jerop in #234 * rename workflow from `gemini-issue-scheduled-triage` to `gemini-scheduled-triage` by @jerop in #238 * feat: rename triage workflows by @jerop in #240 * feat: rename gemini-cli to gemini-invoke by @jerop in #239 * rename PR review workflow to be consistent with the rest by @jerop in #241 * feat(workflows): refactor examples/workflows to use dispatch pattern by @jerop in #242 * feat: pin example workflows to v0 by @jerop in #246 * add google_api_key input in gemini-triage workflows by @jerop in #243 * feat: add best practices guide by @jerop in #245 ## New Contributors * @vivekkairi made their first contribution in #201 **Full Changelog**: v0.1.11...v0.1.12
The dispatch pattern was implemented for dogfooding in this repository by @sethvargo in #212
This is change is mostly coping over workflows in https://github.com/google-github-actions/run-gemini-cli/tree/main/.github/workflows and adding the relevant updates to documentation
This commit refactors the GitHub Actions workflows to use a central dispatch model and significantly improves the documentation.
The
gemini-dispatchworkflow is introduced to act as a single entry point, routing commands to the appropriate reusable workflow (review,triage, orinvoke). This simplifies the overall design, reduces code duplication, and makes the system more extensible.Key changes:
New
gemini-dispatchworkflow:Refactored Reusable Workflows:
gemini-invoke.yml,gemini-scheduled-triage.yml,gemini-triage.yml, andgemini-review.ymlare nowworkflow_callworkflows.Improved Prompts:
Documentation Updates:
README.mdfor the newgemini-dispatchworkflow.README.mdfiles to reflect the new dispatch system, including dependencies and setup instructions.README.mdand theexamples/workflows/README.mdto include the newgemini-dispatchworkflow.