When debug: true, the review comment includes a collapsible section showing which files the agent read, grep patterns used, etc. Also prints agent log on failure for easier troubleshooting.
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: "Pi Code Review"
|
|
description: "AI-powered code review using the Pi coding agent framework with any LLM provider"
|
|
author: "homa"
|
|
|
|
inputs:
|
|
api_key:
|
|
description: "API key for the LLM provider"
|
|
required: true
|
|
provider:
|
|
description: "Pi provider name (zai, anthropic, openai, openrouter, deepseek) or 'custom' for models.json config"
|
|
required: false
|
|
default: "zai"
|
|
model:
|
|
description: "Model ID (e.g. glm-4.7, claude-sonnet-4-20250514, gpt-4o)"
|
|
required: false
|
|
default: "glm-5.1"
|
|
base_url:
|
|
description: "Custom API base URL (for OpenAI-compatible providers). Ignored for built-in providers."
|
|
required: false
|
|
default: ""
|
|
token:
|
|
description: "Git platform token for posting PR comments"
|
|
required: true
|
|
review_prompt:
|
|
description: "Path to a custom review prompt file (relative to calling repo root)"
|
|
required: false
|
|
default: ""
|
|
exclude_patterns:
|
|
description: "Space-separated glob patterns to exclude from the diff"
|
|
required: false
|
|
default: "*.lock package-lock.json yarn.lock pnpm-lock.yaml *.min.js *.min.css *.map"
|
|
tools:
|
|
description: "Comma-separated tools the agent can use (read-only recommended for CI)"
|
|
required: false
|
|
default: "read,grep,find,ls"
|
|
max_diff_bytes:
|
|
description: "Max diff size in bytes before truncation (0 = unlimited)"
|
|
required: false
|
|
default: "80000"
|
|
debug:
|
|
description: "Include agent tool log in the review comment (shows which files were read)"
|
|
required: false
|
|
default: "false"
|
|
|
|
runs:
|
|
using: "docker"
|
|
image: "Dockerfile"
|