Skip to content

Conversation

@sethvargo
Copy link
Contributor

@sethvargo sethvargo commented Aug 21, 2025

This introduces a new top-level workflow "gemini-dispatch" that listens for a series of events. Based on the trigger or contents, it calls another workflow (using workflow_call). This helps keep each workflow separate and allows us to re-use workflows in the future.

The generic "invoke" command still needs a lot of work, but this is progress.

Closes #215

/cc @jerop

@gemini-cli
Copy link
Contributor

gemini-cli bot commented Aug 21, 2025

🤖 Hi @sethvargo, I've received your request. I'm working on it now!

@gemini-cli
Copy link
Contributor

gemini-cli bot commented Aug 21, 2025

🤖 I'm sorry @sethvargo, but I was unable to process your request. Please see the logs for more details.

@sethvargo
Copy link
Contributor Author

The security concern is valid, but this isn't new (and we know it needs fixed already).

Copy link
Contributor

@jerop jerop left a comment

Choose a reason for hiding this comment

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

love the simplification of the triggers and context gathering 🎉

it'd be interesting to extend this to do intelligent routing based on intent using natural language instead of slash commands - #216

@jerop jerop linked an issue Aug 21, 2025 that may be closed by this pull request
Copy link
Contributor

@gemini-cli gemini-cli bot left a 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 refactors the GitHub Actions workflows to be more modular and maintainable by introducing a central dispatch workflow. The changes are well-structured and improve the overall architecture of the CI/CD process.

🔍 General Feedback

  • The move to a dispatch-based workflow system is a great improvement for modularity and readability.
  • Using specific commit hashes for actions enhances the security of the workflows.
  • The new workflows are well-documented with clear names and descriptions.
  • There are a few minor issues, such as a typo and a non-generic example path, which I have commented on inline.

This introduces a new top-level workflow "gemini-dispatch" that listens for a series of events. Based on the trigger or contents, it calls another workflow (using `workflow_call`). This helps keep each workflow separate and allows us to re-use workflows in the future.

The generic "invoke" command still needs a lot of work, but this is progress.
@sethvargo sethvargo enabled auto-merge (squash) August 21, 2025 15:25
Copy link
Contributor

@jerop jerop left a comment

Choose a reason for hiding this comment

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

🚀

@sethvargo sethvargo merged commit 34890ca into main Aug 21, 2025
39 checks passed
@sethvargo sethvargo deleted the sethvargo/dispatch branch August 21, 2025 16:29
@jerop jerop linked an issue Aug 21, 2025 that may be closed by this pull request
jerop added a commit that referenced this pull request Aug 25, 2025
…242)

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-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.
google-github-actions-bot added a commit that referenced this pull request Aug 26, 2025
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Use Dispatcher Pattern in Workflows Simplify PR Review Prompt

2 participants