Skip to content

garden review

Read a pull request’s diff with review threads inline

Terminal window
garden review <pr>

Show a pull request as an annotated diff: the change against the latest base, with review threads drawn inline at their anchor. Use –range to diff between two revisions, –threads for a thread-centric view, or –json for a structured bundle.

Flag Type Default Description
--base int32 0 Diff against this revision number (0 = latest base)
--context int32 3 Context lines around each hunk
--file stringSlice Limit to these file paths (repeatable)
--json bool Output a structured bundle as JSON
--materialize-attachments bool true With –json, download embedded image attachments and rewrite their refs to local file paths (on by default; –materialize-attachments=false keeps the raw refs)
-o, --org string Organization slug (defaults to personal workspace)
--range string Diff revisions “a:b” (e.g. “2:3”); default is latest base → head
-R, --repo string Repository name (default: current checkout)
--threads bool Thread-centric view (for responding) instead of the full diff
--unresolved bool Only show unresolved threads

Apply a whole review from a YAML/JSON document

Terminal window
garden review apply <pr>

Apply a declarative review (YAML or JSON) in one shot: create every comment/reply, then publish them and post the verdict (unless –draft, which leaves them as drafts to review with garden review status).

Document shape (YAML): verdict: approve # approve | comment comments:

- at: api/foo.go:42 # path:line[:col][-line[:col]] → new thread
body: |
nil check needed here — cfg can be unset on the
first request.
- at: api/foo.go:42-48 # a line range
body: extract this into a helper
- reply_to: c:1a2b3c4d # reply to a thread (handle from --threads)
body: fixed in rev 4
resolve: true
- at: web/app.tsx:10 # attach screenshots to a comment
body: new empty state
attachments: [before.png, after.png] # paths relative to the doc
- body: overall LGTM # no at/reply_to → top-level comment

reviewed: [api/foo.go] # mark files reviewed at head (“*” = all) unreviewed: [api/bar.go] # clear a file’s checkpoint

Flag Type Default Description
--draft bool Create the comments as drafts without submitting
-f, --file string Review document (YAML or JSON); omit or ‘-’ to read stdin
-o, --org string Organization slug (defaults to personal workspace)
-R, --repo string Repository name (default: current checkout)

Add a draft comment/reply to your review

Terminal window
garden review comment <pr>

Add a DRAFT comment to your review of a PR. Drafts are visible only to you until you publish them with garden review submit. Same anchoring as garden pr comment (inline –file/–line, ranges, –reply-to to reply), but held as drafts.

Flag Type Default Description
--attach stringArray Attach a local image/video, appended to the body (repeatable)
-b, --body string Comment body (required)
--col int32 0 Anchor start column (optional)
--end-col int32 0 End column of the range (optional)
--end-line int32 0 End line of the range (optional)
--file string Anchor to this file (inline comment)
--line int32 0 Anchor line (with –file)
-o, --org string Organization slug (defaults to personal workspace)
--reply-to string Reply to this thread (c:<short> handle, id, or resource name)
-R, --repo string Repository name (default: current checkout)
--resolve bool Resolve the thread (applies now)
--rev int32 0 Anchor to this revision (0 = head)
--unresolve bool Unresolve the thread (now)

Mark files reviewed up to the current revision

Terminal window
garden review mark-reviewed <pr> [files...]

Record that you’ve reviewed the given files up to the PR’s head revision. The default ‘garden review’ view then diffs each marked file from there, so a new revision only re-shows what changed since. With no files, marks every file in the current diff. Use –unmark to clear a file’s checkpoint (it diffs against trunk again).

Flag Type Default Description
-o, --org string Organization slug (defaults to personal workspace)
-R, --repo string Repository name (default: current checkout)
--unmark bool Clear the checkpoint(s) instead of marking reviewed

Show your pending (draft) review comments

Terminal window
garden review status <pr>
Flag Type Default Description
-o, --org string Organization slug (defaults to personal workspace)
-R, --repo string Repository name (default: current checkout)

Publish your draft comments and post a verdict

Terminal window
garden review submit <pr>

Publish your draft comments on the PR and post a review. Without –approve the review is submitted as comments only.

Flag Type Default Description
-a, --approve bool Approve the pull request (default: comment only)
-o, --org string Organization slug (defaults to personal workspace)
-R, --repo string Repository name (default: current checkout)