dobbe

dobbe review post

Analyze PRs with AI and post reviews directly to GitHub.

Synopsis

dobbe review post [OPTIONS]

Description

review post extends the review pipeline by posting AI-generated reviews as GitHub PR reviews. It performs the same 5-phase analysis as review digest, then deduplicates against existing reviews and posts structured feedback with inline comments at specific file and line locations.

Pipeline Flowchart

┌───────────────────────────────────────────────┐
│  dobbe review post --pr <num|URL|shorthand>   │
│  (or: dobbe review post --repo org/repo)      │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  RESOLVE REPO                                 │
│  --repo flag > config watch_repos > CWD auto  │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 1: DISCOVER PRs                        │
│  --pr 42 / URL / org/repo#42: single PR       │
│  --all:  discover all open PRs via Claude      │
│  (default: --all if neither specified)         │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  CONFIRMATION (unless --yes or --dry-run)     │
│  Shows target + action, waits for user input  │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 2: FILTER                              │
│  - Remove drafts                              │
│  - Apply --skip-label, --skip-author          │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 3: CODEBASE CONTEXT (unless --no-ctx)  │
│  - Load/rebuild cached context                │
│  - Respect --context-ttl / --rebuild-context  │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 4: PRE-FETCH DIFFS                     │
│  - Parallel diff fetching                     │
│  - Truncate at --max-diff-lines               │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 5: ANALYZE                             │
│  - Full code review per PR                    │
│  - Generate concerns with file:line refs      │
│  - Assign risk + recommendations              │
└───────────────────────┬───────────────────────┘
                        │
                        v
┌───────────────────────────────────────────────┐
│  PHASE 6: DEDUP + POST                        │
│                                               │
│  For each analyzed PR:                        │
│  ┌────────────────────────────────┐           │
│  │ Check existing reviews          │           │
│  │ - Compare head SHA              │           │
│  │ - Detect prior dobbe review     │           │
│  └─────────────┬──────────────────┘           │
│          ┌─────┴──────┐                       │
│          │ Already    │                       │
│          │ reviewed?  │                       │
│          └─────┬──────┘                       │
│        yes |       | no                       │
│            v       v                          │
│     ┌──────────┐ ┌─────────────────┐          │
│     │ Skip,    │ │ Build review    │          │
│     │ record   │ │ payload:        │          │
│     │ reason   │ │ - Body text     │          │
│     └──────────┘ │ - Inline        │          │
│                  │   comments at   │          │
│                  │   file:line     │          │
│                  └────────┬────────┘          │
│                           │                   │
│                     ┌─────┴─────┐             │
│                     │ Dry run?  │             │
│                     └─────┬─────┘             │
│                   yes |       | no            │
│                       v       v              │
│                 ┌──────┐ ┌──────────┐         │
│                 │ Log  │ │ Post via │         │
│                 │ only │ │ gh CLI   │         │
│                 └──────┘ └──────────┘         │
└───────────────────────────────────────────────┘

Options

Option Type Default Description
--repo / -r str - Single repo (org/repo). Auto-detected from CWD if omitted.
--pr str - PR number, URL, or shorthand (see formats below)
--all bool False Review all open PRs
--reviewer str - GitHub username to filter by
--dry-run bool False Preview reviews without posting
--format / -f str table Output format: table, json, markdown
--verbose / -V bool False Show concern details with file:line and suggestions
--output str - Write output to file instead of stdout
--skip-label str - Skip PRs with these labels (comma-separated)
--skip-author str - Skip PRs by these authors (comma-separated)
--max-diff-lines int 2000 Max diff lines to include per PR
--rebuild-context bool False Force rebuild codebase context cache
--context-ttl int 7 Context cache TTL in days
--no-context bool False Skip codebase context (diff-only review)
--yes / -y bool False Skip confirmation prompts
--quiet / -q bool False Suppress progress output

--pr Accepted Formats

Format Example Notes
Plain number 42 Requires --repo (or CWD auto-detect)
GitHub URL https://github.com/org/repo/pull/42 Repo extracted from URL; --repo not needed
Shorthand org/repo#42 Repo extracted from shorthand; --repo not needed

Validation Rules

CWD Auto-Detect

When --repo is omitted, dobbe resolves the repository in this order:

  1. Config [review] watch_repos setting
  2. Current working directory – inspects the git remote of the CWD to derive org/repo

If neither source yields a repo, the command exits with an error.

Deduplication

Before posting, dobbe checks whether it has already reviewed the PR at the current head SHA:

  1. Head SHA check - if the PR has new commits since the last review, a new review is posted
  2. Existing review detection - if a dobbe review already exists at the current SHA, the PR is skipped with the reason recorded in PostResult.skipped_reason

Review Payload Structure

Each posted review contains:

Output Models

PostResult

Per-PR posting result:

ReviewPostReport

Aggregate report with computed properties:

Examples

Review a single PR by number

dobbe review post --repo acme/web-app --pr 42

Review a single PR by URL (repo auto-extracted)

dobbe review post --pr https://github.com/acme/web-app/pull/42

Review a single PR by shorthand (repo auto-extracted)

dobbe review post --pr acme/web-app#42

Review from CWD (no –repo needed if inside a git checkout)

cd ~/projects/api
dobbe review post --pr 42

Dry run all open PRs

dobbe review post --repo acme/web-app --all --dry-run --verbose

Skip confirmation and force context rebuild

dobbe review post --pr 42 --yes --rebuild-context

Diff-only review (skip codebase context)

dobbe review post --pr 42 --no-context

See Also