fix: refactor publish workflow and remove obsolete bots#45
Conversation
|
Caution Review failedThe pull request is closed. Note
|
| Layer / File(s) | Summary |
|---|---|
Dispatch workflow metadata and triggers .github/workflows/gemini-dispatch.yml |
Workflow triggers on PR review comments/reviews, PR open, issue open/reopen, and issue comments. Sets bash as default shell for all run steps. |
Dispatch and fallthrough job orchestration .github/workflows/gemini-dispatch.yml |
Debugger job logs event context when step debug is enabled. Dispatch job gates on non-fork PRs/opened issues/@gemini-cli mentions, parses command and context via github-script, optionally mints GitHub App token, and posts acknowledgment comments. Fallthrough job handles pipeline failures or fallthrough commands with error comments. |
Command-to-workflow routing wiring .github/workflows/gemini-dispatch.yml |
Routes parsed commands (review, triage, invoke, plan-execute) to downstream reusable workflows with conditional execution gated by dispatch.outputs.command, forwarding additional_context and inheriting secrets. |
Gemini Action Workflows: Review, Invoke, Plan-Execute
| Layer / File(s) | Summary |
|---|---|
PR code review workflow .github/workflows/gemini-review.yml |
Reusable workflow with 7-minute timeout and scoped permissions. Conditionally mints GitHub App token, checks out repository, and invokes Gemini CLI with GitHub MCP server (Docker-hosted), telemetry configuration, /pr-code-review prompt, and tool allowlists. |
Invoke command workflow .github/workflows/gemini-invoke.yml |
Reusable workflow accepting optional additional context. Configures concurrency without cancellation, conditionally mints identity token, checks out code, and runs Gemini CLI with GitHub MCP server and embedded settings configured for /gemini-invoke prompt. |
Plan-execute workflow .github/workflows/gemini-plan-execute.yml |
Reusable workflow with 30-minute timeout and cancellation of in-progress runs. Mints identity tokens, checks out repository, and runs Gemini CLI with GitHub MCP server, telemetry to .gemini/telemetry.log, shell tools, and /gemini-plan-execute prompt. |
Gemini Triage System: Reusable & Scheduled
| Layer / File(s) | Summary |
|---|---|
Reusable triage workflow .github/workflows/gemini-triage.yml |
Callable workflow that paginates through all repository labels, invokes Gemini CLI to select labels for the target issue, and applies filtered labels while validating against the known label set to prevent label injection. |
Scheduled triage metadata and job configuration .github/workflows/gemini-scheduled-triage.yml |
Hourly cron schedule with path-based filtering for main/release branches and manual dispatch. Concurrency uses workflow name as group with in-progress cancellation enabled. |
Scheduled triage analysis and label automation .github/workflows/gemini-scheduled-triage.yml |
Fetches all repository labels with pagination, finds unlabeled or status/needs-triage issues via GitHub CLI, invokes Gemini CLI for batch analysis, exports results, conditionally mints GitHub App token, and applies validated labels via REST API with error handling. |
Release Publishing Workflow Updates
| Layer / File(s) | Summary |
|---|---|
Publish workflow steps and version handling .github/workflows/publish.yml |
Replaces npm install with npm ci for reproducible dependency management, adds explicit git pull --rebase origin main before version bump, consolidates push to single git push --follow-tags command, and changes version extraction to read from package.json instead of package.cjson. |
Sequence Diagram(s)
sequenceDiagram
participant GitHub as GitHub Events
participant Dispatch as gemini-dispatch
participant Review as gemini-review
participant Triage as gemini-triage
participant Invoke as gemini-invoke
participant PlanExec as gemini-plan-execute
participant Gemini as Gemini CLI
participant GitHub as GitHub API
GitHub->>Dispatch: PR review / issue comment / mention `@gemini-cli`
Dispatch->>Dispatch: Parse command from event body
Dispatch->>Dispatch: Gate by actor authorization
Dispatch->>Dispatch: Mint GitHub App token (optional)
Dispatch->>GitHub: Post acknowledgment comment
alt command == review
Dispatch->>Review: workflow_call with additional_context
Review->>Review: Mint identity token
Review->>Gemini: Run with /pr-code-review prompt
Gemini->>GitHub: GitHub MCP: read PR code
Gemini->>Review: Review results
else command == triage
Dispatch->>Triage: workflow_call
Triage->>GitHub: Fetch all repository labels
Triage->>Gemini: Run with issue/label context
Gemini->>Triage: Selected labels
Triage->>Triage: Validate labels against known set
Triage->>GitHub: Set issue labels
else command == invoke
Dispatch->>Invoke: workflow_call with additional_context
Invoke->>Gemini: Run with /gemini-invoke prompt
Gemini->>Invoke: Command results
else command == plan-execute
Dispatch->>PlanExec: workflow_call
PlanExec->>Gemini: Run with /gemini-plan-execute prompt
Gemini->>GitHub: GitHub MCP: push changes (optional)
else command == fallthrough
Dispatch->>Dispatch: Post failure comment
end
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- KDM-cli/kdm-cli#21: Both PRs modify
.github/workflows/publish.ymlwith different tweaks to the publish workflow release procedure. - KDM-cli/kdm-cli#33: This PR's removal of legacy bot workflows (on-comment, on-pr, on-pr-update, on-pr-close, on-pr-review, on-pr-review-labels) directly supersedes migrations added in PR
#33.
Suggested labels
ci/cd
🧙 From bot scripts to Gemini dreams,
Command dispatch routes the workflow streams.
Labels auto-sort, reviews compile—
The new CI/CD system's got style! ✨
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands and usage tips.
This PR fixes the 'Publish to npm and GitHub Release' workflow by reordering steps and fixing file extensions. It also removes the requested automation bots.
Summary by CodeRabbit
Release Notes
New Features
Chores