feat: gemini cli agent#46
Conversation
|
🤖 Hi @matejpekar, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces GitHub Actions automation powered by Gemini CLI, adding five command configurations and six workflow files to enable automated PR reviews, issue triage, and plan execution. The changes integrate Gemini with MCP servers for GitHub operations and include a dispatch workflow that routes commands to appropriate automation workflows. Changes
Sequence Diagram(s)sequenceDiagram
participant Event as GitHub Event<br/>(PR/Issue)
participant Dispatch as Dispatch<br/>Workflow
participant Router as Command<br/>Router
participant Review as Review<br/>Workflow
participant Triage as Triage<br/>Workflow
participant Invoke as Invoke<br/>Workflow
participant Gemini as Gemini CLI<br/>+ MCP
participant GitHub as GitHub API
Event->>Dispatch: PR/Issue opened,<br/>comment `@gemini-cli`
Dispatch->>Dispatch: Parse event type,<br/>extract command
Dispatch->>Router: Determine command<br/>(review/triage/invoke)
alt Review Command
Router->>Review: Trigger with context
Review->>Review: Mint GitHub App token
Review->>Gemini: Run review prompt<br/>with PR diff
Gemini->>GitHub: Submit pending review
else Triage Command
Router->>Triage: Trigger with context
Triage->>Triage: Fetch available labels
Triage->>Gemini: Run triage prompt<br/>with issue content
Gemini->>Triage: Output selected labels
Triage->>GitHub: Apply labels to issue
else Invoke Command
Router->>Invoke: Trigger with context
Invoke->>Gemini: Run invoke prompt<br/>with additional context
Gemini->>GitHub: Perform operations<br/>via MCP tools
end
Dispatch->>GitHub: Post acknowledgment comment
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The review requires evaluating intricate prompt logic with security constraints, understanding authentication flows across multiple workflows, assessing MCP server configurations, analyzing the dispatch routing logic, and verifying environment variable threading through coordinated workflows. The heterogeneous nature of changes (five distinct command configs plus six workflow types with different purposes) and dense conditional logic demand separate reasoning for each cohort. Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use your project's `pylint` configuration to improve the quality of Python code reviews.Add a pylint configuration file to your project to customize how CodeRabbit runs |
Summary of ChangesHello, 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 integrates a suite of Gemini CLI agents into the GitHub Actions workflow, establishing a framework for advanced AI-driven automation. These agents are designed to handle distinct phases of software development, from initial task analysis and planning to code review and issue management, all while adhering to strict security and operational guidelines. The overall goal is to automate and streamline various development tasks, making the workflow more efficient and robust. Highlights
Ignored Files
Using Gemini Code AssistThe 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
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 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. Footnotes
|
|
🤖 I'm sorry @matejpekar, but I was unable to process your request. Please see the logs for more details. |
There was a problem hiding this comment.
Code Review
This pull request introduces a series of configuration files for a new Gemini CLI agent, defining its behavior through detailed prompts for various tasks like planning, execution, code review, and issue triage. My review focuses on improving the clarity, consistency, and correctness of these prompts to ensure the agent behaves as expected. I've identified a few areas with duplicate instructions, ambiguous placeholders, and grammatical errors that could be improved.
| 1. **Analyze Intent**: Determine the user's goal (bug fix, feature, etc.). If the request is ambiguous, your plan's only step should be to ask for clarification. | ||
|
|
There was a problem hiding this comment.
|
|
||
| Before taking any action, you must locate the latest plan of action in the issue comments. | ||
|
|
||
| 1. **Search for Plan**: Use `issue_read` and `issue_read.get_comments` to find a latest plan titled with "AI Assistant: Plan of Action". |
There was a problem hiding this comment.
There's a minor grammatical error in the prompt. Using "the" instead of "a" would make the instruction clearer for the agent, as it should be looking for the single most recent plan.
1. **Search for Plan**: Use `issue_read` and `issue_read.get_comments` to find the latest plan titled with "AI Assistant: Plan of Action".
| 6. **Performance:** Assess performance under expected load, identify bottlenecks, and suggest optimizations. | ||
|
|
There was a problem hiding this comment.
| 4. Use the "echo" shell command to append the CSV labels to the output file path provided above: | ||
|
|
||
| ``` | ||
| echo "SELECTED_LABELS=[APPROPRIATE_LABELS_AS_CSV]" >> "[filepath_for_env]" |
There was a problem hiding this comment.
The placeholder "[filepath_for_env]" in the example shell command is ambiguous. To ensure the agent correctly identifies the output file, it's better to use the exact variable name "$GITHUB_ENV" which is provided in the "Input Data" section. This makes the instruction more explicit and less prone to misinterpretation.
echo "SELECTED_LABELS=[APPROPRIATE_LABELS_AS_CSV]" >> "$GITHUB_ENV"
Summary by CodeRabbit
Release Notes
New Features
Chores