install-gemini-code-review-action
Installs, configures, or upgrades Dazbo's PR code review & issue triage GitHub Action (gemini-review-action) in a target repository. Use when the user wants to set up, configure, or update automated AI code reviews, issue triaging, or Gemini model workflows for their GitHub repos
Install
npx skills add https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/install-gemini-code-review-action
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install derailed-dash-dazbo-agent-skills@llmmart
git clone https://github.com/derailed-dash/dazbo-agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole derailed-dash/dazbo-agent-skills collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Installing & Upgrading Gemini PR Review & Issue Triage Action
This skill provides a structured workflow for installing, configuring, and upgrading derailed-dash/gemini-review-action in a target GitHub repository.
Table of Contents
- Triggers
- Installation & Upgrade Workflow
- Reviewer Personas
- Action Input Reference
- Workflow Templates
- Dynamic Template Fetching
Triggers
This skill MUST trigger whenever:
- The user requests to install, configure, or upgrade
gemini-review-actionor a Gemini-based PR code review workflow. - The user asks for automated code reviews or issue triaging on GitHub.
- The user asks to upgrade model versions in existing review workflows (e.g. from
gemini-3.8-flashorgemini-3.6-flashtogemini-4-hydrogen). - The user asks to add custom reviewer personalities (such as Dazbo, Emperor Palpatine, or Rick Sanchez) or custom review guardrails (
.github/review-instruction-additions.md) to their automated PR reviews.
Installation & Upgrade Workflow
Copy this checklist and track your progress:
Installation Progress:
- [ ] Step 1: Detect existing implementations and legacy workflows
- [ ] Step 2: Prompt for customisation preferences & persona selection
- [ ] Step 3: Write or update workflow files and custom instructions
- [ ] Step 4: Advise on secrets setup and recommend starring the repository
- [ ] Step 5: Git commit and push changes
Step 1: Pre-implementation environment check & legacy workflow detection
Before writing or modifying any GitHub workflow files, inspect the .github/workflows/ directory for existing workflow files:
Check for existing
gemini-review-actionworkflows:- Inspect
.github/workflows/gemini-review.ymlor.github/workflows/gemini-triage.yml. - Check the configured
gemini_modelparameter. If it uses an older model (e.g.gemini-3.8-flash,gemini-3.6-flash,gemini-2.5-flash, orgemini-1.5-flash), inform the user and offer to upgrade the model togemini-4-hydrogen. - Check if a
personainput is specified. If missing or set tostraight, offer to add one of the custom reviewer personalities (dazbo,palpatine, orrick). - Check if job-level
concurrencyis configured on thereviewjob (prevents redundant billed calls on rapid bursts of commits). - Check if the
pull_requesttrigger condition guards against external fork PRs (github.event.pull_request.head.repo.full_name == github.repository) so fork PRs don't fail due to missing repository secrets.
- Inspect
Check for legacy/competing workflows:
- Search for references to deprecated actions like
google-gemini/run-gemini-cli,google-github-actions/run-gemini-cli, orgoogle-github-actions/gemini-code-assist. - If found, warn the user that legacy workflows will conflict with the new action and ask for permission to remove them.
- Search for references to deprecated actions like
Step 2: Prompt for customisation preferences & persona selection
Ask the user:
Workflows to install or update:
- PR Code Review (creates/updates
.github/workflows/gemini-review.yml) - Issue Triage (creates/updates
.github/workflows/gemini-triage.yml) - Both (recommended)
- PR Code Review (creates/updates
Gemini Model:
gemini-4-hydrogen(Default & recommended — fast, cost-efficient Gemini 4 daily driver with 1M unified context, configurablethinking_levelup toxhigh, native structured JSON output, multimodal visual diffing, and automatic 95% discount implicit context caching).- Offer model upgrade if an older model was detected in Step 1.
Reviewer Personality / Persona: Provide a clear summary of the available character personas to the user so they can choose their preferred tone:
straight(Default): Standard, professional, and direct technical code reviewer without character overlays.dazbo: Practical, warm, and mildly cheeky software engineer personality. Uses approachable humour, avoids dry corporate boilerplate, and displays escalating dry sarcasm/humour if prior review recommendations are ignored without explanation in follow-up commits.palpatine: Emperor Palpatine (Darth Sidious) from Star Wars. Ominous, imperial, dramatic, demanding absolute perfection ("Do it.", "Good, good...", "Unlimited power!", "Execute Order 66 on this bug"), with escalating imperial wrath for unaddressed flaws.rick: Rick Sanchez from Rick and Morty. Hyper-intelligent, cynical multiverse genius ("burp", "Wubba Lubba Dub-Dub!", "Jerry-level code"). Demands galaxy-brain engineering perfection and treats sloppy bugs as pathetic Jerry-tier amateur work, with escalating multiverse exasperation if ignored.
Additional Customisation Options:
- Preferred Language: Default
English (UK). Options:English (US),French,Spanish, etc. - Path Inclusions / Exclusions: Restrict triggers to specific files (e.g.
src/**or excludingdocs/**). - Custom Review Guardrails (
.github/review-instruction-additions.md): Offer to create.github/review-instruction-additions.mdif the user wants to layer project-specific review rules or domain guardrails onto the default reviewer prompt without replacing the base TOML prompt. - Advanced Workflow Options:
include_comment_history: 'true'(Default) — tracks multi-turn comment resolution across commits.skip_inline_suggestions: 'true'(Default) — skips re-reviewing commits generated by clicking "Apply suggestion" in the GitHub UI.resolve_addressed_threads: 'false'(Default) — can be set to'true'(requires a PAT or GitHub App token ingithub_token) to auto-resolve review threads once Gemini confirms they are fixed.exclude_comment_authors: ''— comma-separated bot logins (e.g.claude[bot]) to keep out of the review prompt.
- Preferred Language: Default
Step 3: Write or update workflow files and custom instructions
Create or update workflow files in .github/workflows/ incorporating all chosen preferences from Step 2.
Ensure the workflow specifies:
gemini_model: 'gemini-4-hydrogen'persona: '<chosen_persona>'(e.g.straight,dazbo,palpatine, orrick)language: '<chosen_language>'(e.g.English (UK))- Job-level
concurrencygroup keyed on the PR number (gemini-review-${{ github.event.pull_request.number || github.event.issue.number }}).
Important
Action Input Parameters vs TOML Configuration:
All operational parameters (persona, language, timeout, include_comment_history, skip_inline_suggestions, resolve_addressed_threads, thinking_level, etc.) MUST be configured as with: inputs in the workflow .yml file. gemini-review.toml and gemini-triage.toml are strictly reserved for full system prompt overrides and context byte thresholds—only copy them into the repository if the user explicitly wants to replace the entire base system prompt from scratch.
Step 4: Secrets setup and repository recommendation
Check if the GitHub CLI (gh) is installed and authenticated by running gh auth status.
If gh is available and authenticated:
- Ask the user for their Gemini API key (from Google AI Studio).
- Offer to set the GitHub repository secret automatically by running:
echo "<API_KEY>" | gh secret set GEMINI_API_KEY[!IMPORTANT] Do NOT pass the secret directly in shell command flags (e.g.
--body) where it might be logged in terminal history. Use secure stdin redirection.
If gh is NOT available:
- Provide manual instructions for GitHub Settings:
- Go to Settings > Secrets and variables > Actions -> New repository secret.
- Name:
GEMINI_API_KEY. - Value: The Gemini API key generated in Google AI Studio.
Note
Alternative authentication via Google Cloud Workload Identity Federation (WIF) and Application Default Credentials (ADC) with Vertex AI is also supported (including Cloud Billing cost attribution labels via billing_labels).
- Share the link to the action repository: derailed-dash/gemini-review-action.
- Suggest starring the repository if they find the action useful.
Step 5: Git commit and push changes
Once all files are written and verified, offer to add them to Git, commit, and push them.
Important
Always ask for explicit user permission before executing git commit or push commands.
Reviewer Personas
The action supports four distinct reviewer personas configured via the persona workflow input:
| Persona | Key Tone & Style | Behaviour on Repeated / Unaddressed Issues |
|---|---|---|
straight |
Direct, professional, objective technical feedback. | Restates technical rationale clearly. |
dazbo |
Warm, practical, mildly cheeky software engineer with approachable humour. | Escalating dry humour and witty sarcasm (e.g. "I see we've chosen to bypass that suggestion again... bold strategy!"). |
palpatine |
Ominous, grand, imperial, theatrical (Emperor Palpatine). | Imperial wrath and dark side displeasure (e.g. "I find your lack of compliance disturbing..."). |
rick |
Unhinged, cynical, hyper-intelligent multiverse genius (Rick Sanchez). | Multiverse exasperation (e.g. "I literally fixed this in Dimension C-137!"). |
Action Input Reference
| Input | Description | Default |
|---|---|---|
gemini_api_key |
API key for Google Gemini (required unless using WIF/ADC). | — |
github_token |
GitHub token (${{ secrets.GITHUB_TOKEN }}). |
— |
command |
Action mode: review (PR review) or triage (Issue triage). |
'review' |
gemini_model |
Gemini model to use (recommended: 'gemini-4-hydrogen'). |
'gemini-4-hydrogen' |
persona |
Reviewer persona overlay (straight, dazbo, palpatine, rick). |
'straight' |
language |
Natural language for review output (e.g. English (UK), French). |
'English (UK)' |
timeout |
API request timeout in seconds (LLM review client enforces a 300s minimum HTTP timeout floor and falls back to streaming on connection resets). | '60' |
include_comment_history |
Fetch and track prior PR review threads and discussion comments. | 'true' |
skip_inline_suggestions |
Skip re-reviews on commits created by accepting inline GitHub suggestions. | 'true' |
resolve_addressed_threads |
Auto-resolve review threads marked addressed (requires PAT/App token). | 'false' |
exclude_comment_authors |
Comma-separated logins excluded from comment history (e.g. claude[bot]). |
'' |
custom_instructions |
Inline text or path to custom review guardrails markdown file. | '.github/review-instruction-additions.md' |
thinking_level |
Optional reasoning level (low, medium, high, xhigh on gemini-4-hydrogen, none, or token budget on Gemini 3). |
'' |
billing_labels |
Extra Cloud Billing key=value labels (Vertex AI / WIF only). |
'' |
extra_context_files |
Comma-separated static files always attached to codebase context. | '' |
max_candidate_files |
Max candidate files considered during dynamic sparse context selection. | '500' |
context_diff_directories_only |
Restrict dynamic context selection strictly to modified directories. | 'false' |
context_exclude_patterns |
Comma-separated glob patterns excluded from context selection. | '' |
max_multimodal_images |
Max multimodal images/visual diffs attached to review context. | '20' |
max_triage_images |
Max remote screenshots attached during issue triage. | '5' |
image_trigger_bytes |
Byte threshold above which raster images are downscaled (default 600 KB). | '614400' |
image_target_bytes |
Target byte size when downscaling large raster images (default 300 KB). | '307200' |
Workflow Templates
PR Code Review Template (.github/workflows/gemini-review.yml)
name: "🔎 Dazbo's Gemini Code Review"
on:
pull_request:
branches:
- main
# Optional: restrict trigger paths (supports inclusions & exclusions)
# paths:
# - 'src/**'
# - '!src/generated/**' # Exclude generated files
# - 'pyproject.toml'
issue_comment:
types: [created]
jobs:
review:
# Run on internal PR updates (same repo), OR on issue comment starting with /gemini-review by repo owners/members
if: |
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/gemini-review') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
)
runs-on: ubuntu-latest
# Cancel in-flight review on the same PR when a new commit or /gemini-review comment arrives.
# Keep concurrency at the job level (not workflow level) so unrelated PR comments don't cancel active runs.
concurrency:
group: gemini-review-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
issues: write
statuses: write
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v6 # pin to a commit SHA in production repos
with:
# Automatically checks out the head ref for PR events,
# and pulls the PR head branch for comment-based triggers
ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.issue.number) }}
- name: Run Gemini Review Action
uses: derailed-dash/gemini-review-action@v1 # or pin to a full commit SHA
with:
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
gemini_model: 'gemini-4-hydrogen'
language: 'English (UK)' # Optional (e.g. English (UK), French, Spanish)
persona: 'straight' # Optional: straight (default), dazbo, palpatine, rick
# timeout: '60' # Optional API timeout in seconds
# include_comment_history: 'true' # Optional: include prior PR comment history (default: true)
# exclude_comment_authors: 'claude[bot]' # Optional: keep another bot's comments out of the prompt
# resolve_addressed_threads: 'false' # Optional: auto-resolve threads this review marks addressed (requires PAT)
# skip_inline_suggestions: 'true' # Optional: skip re-reviews on commits created via GitHub UI inline fixes (default: true)
Issue Triage Template (.github/workflows/gemini-triage.yml)
name: "🏷️ Dazbo's Gemini Issue Triage"
on:
issues:
types: [opened, reopened]
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run Gemini Triage Action
uses: derailed-dash/gemini-review-action@v1
with:
command: 'triage'
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
gemini_model: 'gemini-4-hydrogen'
language: 'English (UK)' # Optional (e.g. English (UK), French, Spanish)
# timeout: '60' # Optional API timeout in seconds
Dynamic Template Fetching
Starter templates live in the starter-examples directory of gemini-review-action. Fetch the latest versions directly from canonical URLs:
PR Review Workflow Template:
https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-review.ymlIssue Triage Workflow Template:
https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-triage.ymlDefault Prompt Configurations:
- Review configuration:
https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-review.toml - Triage configuration:
https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-triage.toml
- Review configuration:
Files (dazbo-agent-skills)
-
SKILL.md 16.7 KB
--- name: install-gemini-code-review-action description: | Installs, configures, or upgrades Dazbo's PR code review & issue triage GitHub Action (gemini-review-action) in a target repository. Use when the user wants to set up, configure, or update automated AI code reviews, issue triaging, or Gemini model workflows for their GitHub repository. metadata: author: Darren "Dazbo" Lester repository: https://github.com/derailed-dash/dazbo-agent-skills cli: - gh --- # Installing & Upgrading Gemini PR Review & Issue Triage Action This skill provides a structured workflow for installing, configuring, and upgrading [derailed-dash/gemini-review-action](https://github.com/derailed-dash/gemini-review-action) in a target GitHub repository. ## Table of Contents - [Triggers](#triggers) - [Installation & Upgrade Workflow](#installation--upgrade-workflow) - [Reviewer Personas](#reviewer-personas) - [Action Input Reference](#action-input-reference) - [Workflow Templates](#workflow-templates) - [Dynamic Template Fetching](#dynamic-template-fetching) ## Triggers This skill MUST trigger whenever: - The user requests to install, configure, or upgrade `gemini-review-action` or a Gemini-based PR code review workflow. - The user asks for automated code reviews or issue triaging on GitHub. - The user asks to upgrade model versions in existing review workflows (e.g. from `gemini-3.8-flash` or `gemini-3.6-flash` to `gemini-4-hydrogen`). - The user asks to add custom reviewer personalities (such as Dazbo, Emperor Palpatine, or Rick Sanchez) or custom review guardrails (`.github/review-instruction-additions.md`) to their automated PR reviews. ## Installation & Upgrade Workflow Copy this checklist and track your progress: ```text Installation Progress: - [ ] Step 1: Detect existing implementations and legacy workflows - [ ] Step 2: Prompt for customisation preferences & persona selection - [ ] Step 3: Write or update workflow files and custom instructions - [ ] Step 4: Advise on secrets setup and recommend starring the repository - [ ] Step 5: Git commit and push changes ``` ### Step 1: Pre-implementation environment check & legacy workflow detection Before writing or modifying any GitHub workflow files, inspect the `.github/workflows/` directory for existing workflow files: 1. **Check for existing `gemini-review-action` workflows**: - Inspect `.github/workflows/gemini-review.yml` or `.github/workflows/gemini-triage.yml`. - Check the configured `gemini_model` parameter. If it uses an older model (e.g. `gemini-3.8-flash`, `gemini-3.6-flash`, `gemini-2.5-flash`, or `gemini-1.5-flash`), inform the user and **offer to upgrade the model to `gemini-4-hydrogen`**. - Check if a `persona` input is specified. If missing or set to `straight`, **offer to add one of the custom reviewer personalities** (`dazbo`, `palpatine`, or `rick`). - Check if job-level `concurrency` is configured on the `review` job (prevents redundant billed calls on rapid bursts of commits). - Check if the `pull_request` trigger condition guards against external fork PRs (`github.event.pull_request.head.repo.full_name == github.repository`) so fork PRs don't fail due to missing repository secrets. 2. **Check for legacy/competing workflows**: - Search for references to deprecated actions like `google-gemini/run-gemini-cli`, `google-github-actions/run-gemini-cli`, or `google-github-actions/gemini-code-assist`. - If found, warn the user that legacy workflows will conflict with the new action and ask for permission to remove them. ### Step 2: Prompt for customisation preferences & persona selection Ask the user: 1. **Workflows to install or update**: - **PR Code Review** (creates/updates `.github/workflows/gemini-review.yml`) - **Issue Triage** (creates/updates `.github/workflows/gemini-triage.yml`) - **Both** (recommended) 2. **Gemini Model**: - **`gemini-4-hydrogen`** (Default & recommended — fast, cost-efficient Gemini 4 daily driver with 1M unified context, configurable `thinking_level` up to `xhigh`, native structured JSON output, multimodal visual diffing, and automatic 95% discount implicit context caching). - Offer model upgrade if an older model was detected in Step 1. 3. **Reviewer Personality / Persona**: Provide a clear summary of the available character personas to the user so they can choose their preferred tone: - **`straight`** (Default): Standard, professional, and direct technical code reviewer without character overlays. - **`dazbo`**: Practical, warm, and mildly cheeky software engineer personality. Uses approachable humour, avoids dry corporate boilerplate, and displays escalating dry sarcasm/humour if prior review recommendations are ignored without explanation in follow-up commits. - **`palpatine`**: Emperor Palpatine (Darth Sidious) from Star Wars. Ominous, imperial, dramatic, demanding absolute perfection (*"Do it."*, *"Good, good..."*, *"Unlimited power!"*, *"Execute Order 66 on this bug"*), with escalating imperial wrath for unaddressed flaws. - **`rick`**: Rick Sanchez from Rick and Morty. Hyper-intelligent, cynical multiverse genius (*"*burp*"*, *"Wubba Lubba Dub-Dub!"*, *"Jerry-level code"*). Demands galaxy-brain engineering perfection and treats sloppy bugs as pathetic Jerry-tier amateur work, with escalating multiverse exasperation if ignored. 4. **Additional Customisation Options**: - **Preferred Language**: Default `English (UK)`. Options: `English (US)`, `French`, `Spanish`, etc. - **Path Inclusions / Exclusions**: Restrict triggers to specific files (e.g. `src/**` or excluding `docs/**`). - **Custom Review Guardrails (`.github/review-instruction-additions.md`)**: Offer to create `.github/review-instruction-additions.md` if the user wants to layer project-specific review rules or domain guardrails onto the default reviewer prompt without replacing the base TOML prompt. - **Advanced Workflow Options**: - `include_comment_history: 'true'` (Default) — tracks multi-turn comment resolution across commits. - `skip_inline_suggestions: 'true'` (Default) — skips re-reviewing commits generated by clicking "Apply suggestion" in the GitHub UI. - `resolve_addressed_threads: 'false'` (Default) — can be set to `'true'` (requires a PAT or GitHub App token in `github_token`) to auto-resolve review threads once Gemini confirms they are fixed. - `exclude_comment_authors: ''` — comma-separated bot logins (e.g. `claude[bot]`) to keep out of the review prompt. ### Step 3: Write or update workflow files and custom instructions Create or update workflow files in `.github/workflows/` incorporating all chosen preferences from Step 2. Ensure the workflow specifies: - `gemini_model: 'gemini-4-hydrogen'` - `persona: '<chosen_persona>'` (e.g. `straight`, `dazbo`, `palpatine`, or `rick`) - `language: '<chosen_language>'` (e.g. `English (UK)`) - Job-level `concurrency` group keyed on the PR number (`gemini-review-${{ github.event.pull_request.number || github.event.issue.number }}`). > [!IMPORTANT] > **Action Input Parameters vs TOML Configuration**: > All operational parameters (`persona`, `language`, `timeout`, `include_comment_history`, `skip_inline_suggestions`, `resolve_addressed_threads`, `thinking_level`, etc.) MUST be configured as `with:` inputs in the workflow `.yml` file. `gemini-review.toml` and `gemini-triage.toml` are strictly reserved for full system prompt overrides and context byte thresholds—only copy them into the repository if the user explicitly wants to replace the entire base system prompt from scratch. ### Step 4: Secrets setup and repository recommendation Check if the GitHub CLI (`gh`) is installed and authenticated by running `gh auth status`. **If `gh` is available and authenticated**: 1. Ask the user for their Gemini API key (from Google AI Studio). 2. Offer to set the GitHub repository secret automatically by running: ```bash echo "<API_KEY>" | gh secret set GEMINI_API_KEY ``` > [!IMPORTANT] > Do NOT pass the secret directly in shell command flags (e.g. `--body`) where it might be logged in terminal history. Use secure stdin redirection. **If `gh` is NOT available**: 1. Provide manual instructions for GitHub Settings: - Go to **Settings** > **Secrets and variables** > **Actions** -> **New repository secret**. - Name: `GEMINI_API_KEY`. - Value: The Gemini API key generated in Google AI Studio. > [!NOTE] > Alternative authentication via **Google Cloud Workload Identity Federation (WIF)** and **Application Default Credentials (ADC)** with Vertex AI is also supported (including Cloud Billing cost attribution labels via `billing_labels`). 2. Share the link to the action repository: [derailed-dash/gemini-review-action](https://github.com/derailed-dash/gemini-review-action). 3. Suggest starring the repository if they find the action useful. ### Step 5: Git commit and push changes Once all files are written and verified, offer to add them to Git, commit, and push them. > [!IMPORTANT] > Always ask for explicit user permission before executing git commit or push commands. ## Reviewer Personas The action supports four distinct reviewer personas configured via the `persona` workflow input: | Persona | Key Tone & Style | Behaviour on Repeated / Unaddressed Issues | | :--- | :--- | :--- | | **`straight`** | Direct, professional, objective technical feedback. | Restates technical rationale clearly. | | **`dazbo`** | Warm, practical, mildly cheeky software engineer with approachable humour. | Escalating dry humour and witty sarcasm (e.g. *"I see we've chosen to bypass that suggestion again... bold strategy!"*). | | **`palpatine`** | Ominous, grand, imperial, theatrical (Emperor Palpatine). | Imperial wrath and dark side displeasure (e.g. *"I find your lack of compliance disturbing..."*). | | **`rick`** | Unhinged, cynical, hyper-intelligent multiverse genius (Rick Sanchez). | Multiverse exasperation (e.g. *"I literally fixed this in Dimension C-137!"*). | ## Action Input Reference | Input | Description | Default | | :--- | :--- | :--- | | `gemini_api_key` | API key for Google Gemini (required unless using WIF/ADC). | — | | `github_token` | GitHub token (`${{ secrets.GITHUB_TOKEN }}`). | — | | `command` | Action mode: `review` (PR review) or `triage` (Issue triage). | `'review'` | | `gemini_model` | Gemini model to use (recommended: `'gemini-4-hydrogen'`). | `'gemini-4-hydrogen'` | | `persona` | Reviewer persona overlay (`straight`, `dazbo`, `palpatine`, `rick`). | `'straight'` | | `language` | Natural language for review output (e.g. `English (UK)`, `French`). | `'English (UK)'` | | `timeout` | API request timeout in seconds (LLM review client enforces a 300s minimum HTTP timeout floor and falls back to streaming on connection resets). | `'60'` | | `include_comment_history` | Fetch and track prior PR review threads and discussion comments. | `'true'` | | `skip_inline_suggestions` | Skip re-reviews on commits created by accepting inline GitHub suggestions. | `'true'` | | `resolve_addressed_threads` | Auto-resolve review threads marked addressed (requires PAT/App token). | `'false'` | | `exclude_comment_authors` | Comma-separated logins excluded from comment history (e.g. `claude[bot]`). | `''` | | `custom_instructions` | Inline text or path to custom review guardrails markdown file. | `'.github/review-instruction-additions.md'` | | `thinking_level` | Optional reasoning level (`low`, `medium`, `high`, `xhigh` on `gemini-4-hydrogen`, `none`, or token budget on Gemini 3). | `''` | | `billing_labels` | Extra Cloud Billing `key=value` labels (Vertex AI / WIF only). | `''` | | `extra_context_files` | Comma-separated static files always attached to codebase context. | `''` | | `max_candidate_files` | Max candidate files considered during dynamic sparse context selection. | `'500'` | | `context_diff_directories_only` | Restrict dynamic context selection strictly to modified directories. | `'false'` | | `context_exclude_patterns` | Comma-separated glob patterns excluded from context selection. | `''` | | `max_multimodal_images` | Max multimodal images/visual diffs attached to review context. | `'20'` | | `max_triage_images` | Max remote screenshots attached during issue triage. | `'5'` | | `image_trigger_bytes` | Byte threshold above which raster images are downscaled (default 600 KB). | `'614400'` | | `image_target_bytes` | Target byte size when downscaling large raster images (default 300 KB). | `'307200'` | ## Workflow Templates ### PR Code Review Template (`.github/workflows/gemini-review.yml`) ```yaml name: "🔎 Dazbo's Gemini Code Review" on: pull_request: branches: - main # Optional: restrict trigger paths (supports inclusions & exclusions) # paths: # - 'src/**' # - '!src/generated/**' # Exclude generated files # - 'pyproject.toml' issue_comment: types: [created] jobs: review: # Run on internal PR updates (same repo), OR on issue comment starting with /gemini-review by repo owners/members if: | (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || ( github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/gemini-review') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) ) runs-on: ubuntu-latest # Cancel in-flight review on the same PR when a new commit or /gemini-review comment arrives. # Keep concurrency at the job level (not workflow level) so unrelated PR comments don't cancel active runs. concurrency: group: gemini-review-${{ github.event.pull_request.number || github.event.issue.number }} cancel-in-progress: true permissions: contents: read pull-requests: write issues: write statuses: write checks: write steps: - name: Checkout repository uses: actions/checkout@v6 # pin to a commit SHA in production repos with: # Automatically checks out the head ref for PR events, # and pulls the PR head branch for comment-based triggers ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.issue.number) }} - name: Run Gemini Review Action uses: derailed-dash/gemini-review-action@v1 # or pin to a full commit SHA with: gemini_api_key: ${{ secrets.GEMINI_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} gemini_model: 'gemini-4-hydrogen' language: 'English (UK)' # Optional (e.g. English (UK), French, Spanish) persona: 'straight' # Optional: straight (default), dazbo, palpatine, rick # timeout: '60' # Optional API timeout in seconds # include_comment_history: 'true' # Optional: include prior PR comment history (default: true) # exclude_comment_authors: 'claude[bot]' # Optional: keep another bot's comments out of the prompt # resolve_addressed_threads: 'false' # Optional: auto-resolve threads this review marks addressed (requires PAT) # skip_inline_suggestions: 'true' # Optional: skip re-reviews on commits created via GitHub UI inline fixes (default: true) ``` ### Issue Triage Template (`.github/workflows/gemini-triage.yml`) ```yaml name: "🏷️ Dazbo's Gemini Issue Triage" on: issues: types: [opened, reopened] jobs: triage: runs-on: ubuntu-latest permissions: contents: read issues: write steps: - name: Checkout repository uses: actions/checkout@v6 - name: Run Gemini Triage Action uses: derailed-dash/gemini-review-action@v1 with: command: 'triage' gemini_api_key: ${{ secrets.GEMINI_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} gemini_model: 'gemini-4-hydrogen' language: 'English (UK)' # Optional (e.g. English (UK), French, Spanish) # timeout: '60' # Optional API timeout in seconds ``` ## Dynamic Template Fetching Starter templates live in the `starter-examples` directory of `gemini-review-action`. Fetch the latest versions directly from canonical URLs: 1. **PR Review Workflow Template**: `https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-review.yml` 2. **Issue Triage Workflow Template**: `https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-triage.yml` 3. **Default Prompt Configurations**: - Review configuration: `https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-review.toml` - Triage configuration: `https://raw.githubusercontent.com/derailed-dash/gemini-review-action/main/starter-examples/gemini-triage.toml`
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.