Skip to content

review: add 'agent review default' to set the default code review pipeline - #92

Merged
hbrooks merged 1 commit into
mainfrom
review-defaults
Jul 29, 2026
Merged

review: add 'agent review default' to set the default code review pipeline#92
hbrooks merged 1 commit into
mainfrom
review-defaults

Conversation

@ellipsis-dev

@ellipsis-dev ellipsis-dev Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Companion to ellipsis-dev/ellipsis#6032 (the backend half — merge that first). Requested by @hbrooks (Slack): a way to programmatically set the default code review config.

What

agent review default — which code review pipeline runs when an explicit review (agent review … / POST /v1/reviews) names none. A two-rung ladder mirroring agent config default, with the same --repo semantics (absent → account rung; bare --repo → the repo you're standing in; --repo owner/name → that repo):

agent review default                     # the effective default where you stand
agent review default list                # every rung, with broken-pointer badges
agent review default set crcfg_… [-r]    # point the account or a repo rung
agent review default clear [-r]          # clear a rung

Only explicit reviews read the ladder — webhook reviews keep matching the pipelines' own pull_requests: filters.

  • src/commands/review.ts — the default group (bare show / list / set / clear).
  • src/lib/api.ts + src/lib/types.tslistReviewDefaults / putReviewDefault / deleteReviewDefault over GET/PUT/DELETE /v1/reviews/defaults, hand-rolled types like the /v1/defaults trio (neither is in the SDK's OpenAPI allowlist).
  • src/commands/config.ts — exports resolveRepoFlag so both ladders share the --repo semantics.

Testing

  • New ApiClient review defaults block in test/api.test.ts (paths, methods, envelope unwrap, the repository query param encoding).
  • npm run typecheck clean; npm test 389 passed.
  • Smoke-tested agent review default --help / agent review --help rendering via tsx.

🤖 Generated with Claude Code

…eline

A two-rung ladder (account default + per-repo defaults, repo wins) mirroring 'agent config default', over the new GET/PUT/DELETE /v1/reviews/defaults endpoints (ellipsis-dev/ellipsis#6032). Only explicit reviews read it; webhook reviews keep matching the pipelines' own pull_requests filters.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hbrooks
hbrooks merged commit 9d479f1 into main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant