dsh-github-review
A GitHub PR review bot that lives in DeepSeek Harness (DSH). When a pull request opens, a review Session starts in your Desktop sidebar within seconds: it reads the diff, posts severity-tagged inline comments, fixes blocking findings itself, replies in review threads, and approves or requests changes.
Unlike the hosted Codex/Claude reviewers, this bot never stops at comments:
| Capability | Hosted Codex/Claude review | dsh-github-review |
|---|---|---|
| Auto-trigger on PR | ✅ on GitHub runners | ✅ webhook into your DSH host |
| Inline comments + summary | ✅ | ✅ with [P0]–[P3] prefixes |
| Commit-status gate | ✅ | ✅ dsh-review status + ai-review:* labels |
| APPROVE / block merge | ❌ comment-only | ✅ approve or request-changes |
| Auto-fix and push | ❌ | ✅ temporary worktree → checks → push → re-review |
| Thread conversations | ❌ one-way | ✅ replies, resolves, round limit |
| Learns from repeats | ❌ | ✅ lessons ledger with promotion |
| Model & skills | locked | any DSH model + any skills you configure |
中文说明见 README.zh.md。内部结构见 docs/architecture.md。
How it works
GitHub ──(signed webhook)──> your DSH host (127.0.0.1:3081/github)
└─ rule: allowlist + dedupe ticket ──> review Session in the Desktop sidebar
├─ gh-bot / review-threads / post-review helpers (bot identity)
├─ findings P0–P3, inline comments, review body
├─ blocking? ── fix in tmp worktree ── run your check ── push ── approve
└─ threads replied & resolved; round cap hands off to a human
One webhook delivery becomes at most one Session. Same-head retries are deduplicated; a new push supersedes the old review; the bot's final review releases the slot instantly.
Requirements
- DSH Desktop
0.2.2-rc.3+with thedsh-webhook/dsh-webhook-githubpackages (declared as dependencies of this bundle) ghCLI on PATH,pwsh(PowerShell 7) on PATH- A dedicated GitHub account for the bot, invited to the repository with
Write access, with a classic PAT (
reposcope) — fine-grained tokens cannot write to repositories the account collaborates on - An HTTPS ingress to your machine (any reverse proxy, or
tailscale funnel 8443 --https=3081)
Setup
Token file on the machine that runs DSH:
~/.dsh/github-review/bot-token.txt # contains only the classic PATOptionally point elsewhere with the
DSH_GITHUB_REVIEW_TOKENenvironment variable (a file path) or the-TokenPathparameter on every helper.Webhook secret in
~/.dsh/.credentials.yaml:refs: DSH_GITHUB_WEBHOOK_SECRET: <64+ random hex>Install the bundle into your Desktop profile: clone this repository and run
dsh plugin --profile <name> add ., or download the tarball from GitHub Releases and rundsh plugin --profile <name> add ./dsh-github-review-<version>.tgz.Wire the patch layer using cordis.patch.yml as the starting point: set the rule's
repository,workspacePath,allowedAuthors, andbotLogin. The webhook server binds127.0.0.1:3081.GitHub webhook on your repository:
- URL:
https://<your-ingress>/github - Content type:
application/json - Secret: the same value as
DSH_GITHUB_WEBHOOK_SECRET - Events:
pull_request,pull_request_review,pull_request_review_comment
- URL:
Recommended: add the bot's
dsh-reviewstatus context to your branch protection as a required check, and require 1 approval so the bot's approve can satisfy it.
Rule configuration
Every rule field, its default, and its meaning lives in one place: docs/configuration.md. Credentials (webhook secret, bot token) are covered there too.
The lessons ledger
When the target repository keeps an AI-REVIEW-LESSONS.md, the reviewer reads
it before assigning severity and appends one row per P0/P1 finding (rule, why,
evidence, Seen counter). A rule seen three times is promoted into the
repository's own coding standards. The whole loop is optional — repositories
without the file simply skip it.
Safety model
- Webhook deliveries are HMAC-verified; the listener binds loopback only.
- PR text, comments, and diffs are treated as untrusted data, never as instructions.
- The bot writes only to the PR branch, PR body, reviews, and review threads; it never merges, never closes, and never approves its own PR.
- Auto-fix runs in a temporary worktree, never touches CI workflow files, and is skipped for fork PRs.
- Tokens are read from files/environment variables and never appear in command lines, logs, or prompts.
Limitations
- The DSH host must stay running; deliveries fail while it is down.
- Helper scripts are PowerShell; POSIX hosts can run the rule but not the helpers as-is.
- One rule instance per host; review several repositories with the
reposlist (per-repo workspace, commands, and options). One bot account per install.
Documentation
- Architecture · Development · Testing
- Configuration reference · PR delivery gate
- Architecture decisions: docs/adr · Project terms: GLOSSARY.md
- Changelog · Safety · Security · Trademarks · Third-party notices
License
MIT © 2026 qikairo7
No comments yet. Be the first to write one.