DSH Code Review, GitHub PRs & Git Worktrees Guide
Review GitHub PRs and GitLab MRs in DeepSeek Harness, isolate agent sessions in Git worktrees (enter_worktree), and automate read-only webhook PR reviews.
On this page
1. Start isolated Git worktree sessions
- Open Plugins and enable Change requests & worktrees (
@deepseek-ai/dsh-experimental-forge-bundle) in the Official group. - Check Worktree in the composer before sending the first prompt (with custom branch or remote-ref options in
v0.2.3-alpha.1), or let the model callenter_worktreeandexit_worktreemid-session without touching your main checkout.
2. Interactive GitHub PR and GitLab MR review
Once signed in via gh auth login on the host, DSH links active pull requests automatically. Starting in v0.2.3-alpha.1, a dedicated Code Review page lists your GitHub PRs (plus GitLab review and merge support) so you can step through file diffs, select lines, and hand review comments to the agent.
3. Trigger read-only PR reviews from GitHub webhooks
To start an automatic read-only review session whenever a repository PR moves to ready_for_review, install both experimental webhook packages into the web profile (mounting an isolated POST /github listener on 127.0.0.1:3081 while keeping the Web UI on 3080):
export DSH_GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)"
dsh plugin --profile web add @deepseek-ai/dsh-webhook @deepseek-ai/dsh-webhook-github
export DSH_GITHUB_REVIEW_WORKSPACE=/path/to/your-repo
dsh web --patch "${DSH_HOME:-$HOME/.dsh}/profiles/web/node_modules/@deepseek-ai/dsh-webhook-github/examples/github-review/cordis.yml"Copy the example directory into $DSH_HOME/profiles/web/github-review/ to customize the target repository name, and forward only /github through a TLS reverse proxy.
Common questions
Does turning off Change requests & worktrees delete my branches?
No. Disabling the plugin removes the UI panel and the enter_worktree / exit_worktree tools while leaving all existing Git worktree checkouts and branches intact.
Why are GitHub PR checks missing even though local worktrees work?
Local worktrees need only Git, whereas GitHub PR status reads from your host's signed-in gh CLI. Run gh auth login --hostname github.com in a terminal.
Is the GitHub webhook review overlay allowed to push commits or edit files?
No. The official github-review overlay launches sessions under the read-only permission preset and treats incoming PR JSON metadata as untrusted input.