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: codeberg.org/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 three 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-chat. Use deepseek-reasoner 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.
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, security, shell.
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 any agent using
deepseek-reasoner.
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.
Full example¶
when:
event: pull_request
steps:
- name: ai-review
image: codeberg.org/marvin8/wuming:latest
environment:
WUMING_FORGEJO_TOKEN:
from_secret: wuming_forgejo_token
WUMING_DEEPSEEK_KEY:
from_secret: wuming_deepseek_key
WUMING_AGENTS: code:deepseek-chat,config,security
WUMING_MAX_DIFF_LINES: "2000"
WUMING_SKIP_PATHS: "*.lock,vendor/**"