Deploying on Woodpecker¶
This guide walks through adding WuMing to a repository hosted on Codeberg (or any Forgejo instance) that uses Woodpecker CI for continuous integration.
Prerequisites¶
You need:
- A Forgejo API token with at least read repository and write issues permissions. On Codeberg, create one at Settings → Applications → Access tokens.
- An AI backend API key (or a running Ollama instance). See Choosing a backend below.
- Woodpecker CI connected to your repository.
Minimal setup¶
Create .woodpecker/ai-review.yaml in your repository:
when:
event: pull_request
steps:
- name: ai-review
image: registry.marvin8.zone/marvin8/wuming:latest
environment:
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_DEEPSEEK_KEY:
from_secret: wuming_deepseek_key
This runs the default code agent using the DeepSeek backend on every PR.
Adding secrets in Woodpecker¶
Woodpecker normalises secret names to lowercase at lookup time. Always use lowercase
names both in the Woodpecker UI and in your from_secret: references.
- Open your repository in Woodpecker → Settings → Secrets.
- Add
wuming_forgejo_tokenwith your Forgejo token value. - Add the API key secret for whichever backend you choose (see below).
Choosing a backend¶
WuMing supports four AI backends. Set WUMING_BACKEND to select one.
DeepSeek (default)¶
environment:
WUMING_BACKEND: deepseek
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_DEEPSEEK_KEY:
from_secret: wuming_deepseek_key
Obtain a key at platform.deepseek.com. The default
model is deepseek-v4-flash. Use deepseek-v4-pro for more thorough analysis (see
per-agent model selection).
Anthropic (Claude)¶
environment:
WUMING_BACKEND: anthropic
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_ANTHROPIC_KEY:
from_secret: wuming_anthropic_key
Obtain a key at console.anthropic.com.
Ollama (self-hosted)¶
environment:
WUMING_BACKEND: ollama
WUMING_OLLAMA_URL: http://ollama.internal:11434
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_OLLAMA_URL must point to a reachable Ollama instance. The model is selected
per-agent via the name:model syntax in WUMING_AGENTS.
Moonshot (Kimi)¶
environment:
WUMING_BACKEND: moonshot
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_MOONSHOT_KEY:
from_secret: wuming_moonshot_key
Obtain a key at platform.kimi.ai. The default model is
kimi-k2.7-code. Use kimi-k3 or kimi-k2.6 via per-agent model selection.
Selecting agents¶
Set WUMING_AGENTS to a comma-separated list of agent names. Each agent reviews only
the files that match its glob patterns — they run concurrently.
Valid names: code, config, docs, performance, security, shell, tests.
See the Agents reference for what each agent covers.
Per-agent model selection¶
Append :model to any agent name to override the model for that agent:
WUMING_MAX_TOKENS is automatically raised to 16384 for all DeepSeek and Moonshot
calls.
Handling large PRs¶
For repositories with occasionally large PRs, set WUMING_MAX_DIFF_LINES to a
positive integer. When the raw diff exceeds that line count, WuMing posts a single
plain comment and exits without inline review.
Individual hunks longer than 300 lines are always truncated before being sent to agents, regardless of this setting, to keep API costs predictable.
See the Configuration reference for all tunables.
Debugging and dry runs¶
To test your configuration without posting any comments to a real PR, enable dry-run mode. WuMing will fetch the diff and run agents as normal, but log the would-be comments to stdout instead of posting them:
To inspect the raw LLM request and response for troubleshooting (e.g. malformed agent output or unexpected filtering), enable verbose logging. Note that logs will contain repository source code:
To post a plain PR-level summary comment with per-agent severity counts after the review, set:
Full example¶
when:
event: pull_request
steps:
- name: ai-review
image: registry.marvin8.zone/marvin8/wuming:latest
environment:
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_DEEPSEEK_KEY:
from_secret: wuming_deepseek_key
WUMING_AGENTS: code:deepseek-v4-flash,config,security
WUMING_MAX_DIFF_LINES: "2000"
WUMING_SKIP_PATHS: "*.lock,vendor/**"