deepseek pr is a subcommand group for working with GitHub pull requests via the
gh CLI.
dscode pr remains supported as a compatibility alias, but the primary command
spelling is deepseek pr.
ghCLI version 2.40+ installed (brew install ghor see https://cli.github.com/)- Authenticated:
gh auth login deepseek doctorshould showgh auth: okin the[github]section
Check whether a real PR is usable for live PR review and retry fixtures without posting comments or mutating the worktree.
deepseek pr live-status owner/repo#42
deepseek pr live-status https://github.com/.../pull/42 --require-write
deepseek pr live-status owner/repo#42 --json
The command verifies gh authentication, PR metadata, changed files, PR diff
availability, repository read permission, and current-branch alignment. With
--require-write, it also requires repo permissions that conservatively imply
write-capable guarded PR comment fixtures (push, maintain, or admin).
With --json, it emits deepseek.pr_live_status.v1 for CI scripts.
Run a read-only review pass over the PR diff. The agent is restricted to
list_files, read_file, search_text, and git_diff — no writes.
deepseek pr review 42 # review PR #42 in the current repo
deepseek pr review owner/repo#42 # explicit owner/repo
deepseek pr review https://github.com/.../pull/42
deepseek pr review 42 --post # also post a summary comment
deepseek pr review 42 --out review.md # also write to a local file
The terminal trace contains the full review report. With --post and --out,
v1 sends a summary stub that points the reader back to the terminal trace.
Capturing the planner's complete report into the comment body is a v2 item.
Pull the failing CI job's tail log and iterate locally to fix it. The agent is
allowed to call apply_patch, run_shell, etc., subject to P3 confirm prompts
(or the DSCODE_AUTO_APPROVE_* env vars). Step budget is 12 (vs. the default 4)
to fit a read → patch → shell → re-read cycle.
You must be on the PR's head branch first:
gh pr checkout 42
deepseek pr fix 42
deepseek pr fix 42 --job test-rust # restrict to one CI job
If no failed CI jobs are found, the command exits cleanly with a notice.
Apply additional changes to the PR head; default leaves changes in the worktree.
gh pr checkout 42
deepseek pr patch 42
deepseek pr patch 42 --commit # also commit (clean worktree required); does NOT push
--commit will refuse to run if the worktree has uncommitted changes — commit
or stash first.
| Code | Meaning |
|---|---|
| 0 | Success (or "no failures" for pr fix) |
| 1 | Internal error (planner / gh returned non-zero) |
| 2 | User declined a prompt or branch / worktree precondition failed |
| 3 | gh not installed or not authenticated |
All three commands inherit the existing approval pipeline:
- Writes (
apply_patch) and shell commands (run_shell) prompt before running unlessDSCODE_AUTO_APPROVE_WRITES=1/DSCODE_AUTO_APPROVE_SHELL=1are set - Non-TTY runs (CI / piped input) auto-deny with a clear stderr message naming the env-var bypass
- All user-controlled values (PR title, file paths, commands) pass through an ANSI-stripping sanitizer before reaching the prompt
- Branch and clean-worktree checks gate
pr fixandpr patch --commitso changes can't accidentally land on the wrong branch
- GitHub-only (
ghCLI). GitLab / Gitea support is not planned for v1. --pushis not implemented;--commitstops at a local commit.--max-attemptsis not implemented; rerundeepseek pr fixfor another round.pr review --postposts one summary comment. Agent-driven inline review comments are available through the guardedgithub_pr_review_commenttool when durable approvals are enabled, not throughdeepseek pr review --post.