Review
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
PATCH | |
GET | |
GET | |
GET | |
GET | |
GET | |
POST | |
GET | |
PATCH |
Retrieve review hog repository overview
Every repository the GitHub installation can see, with the project that reviews it, this project's settings, the requesting user's choice, and the automatic review the requesting user gets.
Query parameters
- installation_idstring
- limitintegerDefault:
50 - offsetintegerDefault:
0 - searchstringDefault:
- viewstringDefault:
allOne of:"all""in_project""exceptions""mine""differs"
Response
Example request
GET /api /projects /:project_id /review_hog /repository_overviewExample response
Status 200
Status 400 The installation is not connected here.
List all review hog resolution
List the review-hog-resolution-* skills visible to the requesting user — the canonical criteria plus the customs they authored — flagging the one active for them. The canonical skill is auto-seeded active on the first read; a custom skill the user has not selected shows as inactive.
Required API key scopes
llm_skill:readExample request
GET /api /projects /:project_id /review_hog /resolutionExample response
Status 200 Every resolution-criteria skill on this project, flagging the one active for the user.
Update review hog resolution
Make a review-hog-resolution-* skill the single criteria the resolution stage applies on the requesting user's PRs, switching the user's other resolution skills off in the same call. Only skills visible to the user — the canonical plus the customs they authored — can be selected; anything else 404s. Upserts the per-user config row, so selecting a freshly authored custom skill works in one call.
Required API key scopes
llm_skill:writePath parameters
- skill_namestring
Request parameters
- activeboolean
Response
Example request
PATCH /api /projects /:project_id /review_hog /resolution /:skill_nameExample response
Status 200 The resolution criteria now active for the user.
Status 400 Not a resolution skill, or `active` was not true.
Status 404 No such resolution skill visible to the user on this project.
List all review hog reviews
Recent code reviews on this project: actively running reviews first (with the in-flight turn's stage), then the most recent completed ones — at most limit rows (default 5), plus has_more for whether a larger limit would reveal more. By default only the requesting user's reviews; scope=everyone lists every review on the project.
Required API key scopes
review_hog:readQuery parameters
- limitintegerDefault:
5 - scopestringDefault:
mineOne of:"mine""everyone"
Response
Example request
GET /api /projects /:project_id /review_hog /reviewsExample response
Status 200 The scoped reviews: in-progress runs first, then completed newest first, with a flag for whether more exist beyond `limit`.
Retrieve review hog reviews
One completed code review on this project, with one turn's validated findings, the findings the validator dismissed (and why), and the review body published to GitHub. The latest completed turn by default; run_index reads an older one. in_progress, progress, and the resolution fields describe the report now, whatever the turn. Project-wide, so reviews listed under scope=everyone can be opened too.
Required API key scopes
review_hog:readPath parameters
- idstring
Query parameters
- run_indexinteger
Response
Example request
GET /api /projects /:project_id /review_hog /reviews /:idExample response
Status 200 The review's detail: findings (valid and dismissed) and the published body.
Status 404 No such review on this project, or no such completed turn.
Retrieve review hog reviews perspective stats
How many findings each review skill (perspective or blind-spot sweep) raised across the recent completed reviews in scope — the requesting user's by default, every review on this project with scope=everyone, the user's own last Deep reviews with scope=own_deep — and how many of those the validator kept vs dismissed.
Required API key scopes
review_hog:readQuery parameters
- scopestringDefault:
mineOne of:"mine""everyone""own_deep"
Response
Example request
GET /api /projects /:project_id /review_hog /reviews /perspective_statsExample response
Status 200 Per-skill effectiveness across the recent completed reviews in scope.
Retrieve review hog reviews pr status
Where a pull request's review runs stand: state, the latest completed review turn, and the latest Resolve run. Works for any pull request on the project, also ones the caller did not trigger. Pass the requested_at and head_sha the trigger returned, and the run_mode it was called with, to get request_outcome, which says when that request is done.
Required API key scopes
review_hog:readQuery parameters
- head_shastring
- pr_urlstring
- requested_atstring
- run_modestringDefault:
reviewOne of:"review""review_only""resolve_only""flash"
Response
Example request
GET /api /projects /:project_id /review_hog /reviews /pr_statusExample response
Status 200 The pull request's review status.
Status 400 Not a GitHub pull request URL, or an invalid parameter.
Retrieve review hog reviews table
Code reviews on this project as a paginated table: reviews with a completed turn plus reviews with a run in flight, ordered by last activity, so a review that starts or finishes moves to the top. Pages with limit and offset; count is the total across pages. Filters by repository, review_mode, status, and published. running_count counts the running reviews under every filter except status. By default only the requesting user's reviews; scope=everyone lists every review on the project.
Required API key scopes
review_hog:readQuery parameters
- limitintegerDefault:
25 - offsetintegerDefault:
0 - publishedboolean | null
- repositorystring
- review_modestringOne of:
"full""flash" - scopestringDefault:
mineOne of:"mine""everyone" - statusstringOne of:
"running""completed"
Response
Example request
GET /api /projects /:project_id /review_hog /reviews /tableExample response
Status 200 One page of reviews, most recent activity first, with the total and running counts.
Create review hog reviews trigger
Start a PostHog Review run on any pull request the project's GitHub App installation can access, and publish it back to the PR. The run appears under the requesting user's recent reviews. A Deep review uses the requester's enabled perspectives, blind-spot check, validator, and urgency threshold; a Standard review uses none of them. Resolution writes to the branch only when the pull request owner opted in, whoever asks. run_mode picks the variant: 'review' is a Deep review that chains the resolution stage per the owner's resolve_comments setting, 'review_only' is a Deep review without resolving, 'resolve_only' runs resolution only, and 'flash' is a lower-cost Standard review that never resolves comments and is refused after a published Deep review. Nonexistent, closed, and fork PRs are rejected synchronously. A PR whose current commit already has a published review in the requested mode returns 'already_reviewed' without starting a run (resolve_only skips that check, because settling threads on a reviewed head is its whole point). A request while a review runs is queued on that PR's run. Otherwise non-blocking: returns immediately with the PR's head, the review's id when one exists, and whether resolution will run, while the run executes in the worker.
Required API key scopes
review_hog:writeRequest parameters
- pr_urlstring
- run_modeDefault:
review
Response
Example request
POST /api /projects /:project_id /review_hog /reviews /triggerExample response
Status 200 No new run needed: the PR's current commit already has a published review.
Status 202 Review run started.
Status 400 Invalid PR URL, inaccessible repository, or a nonexistent, closed, or fork PR.
Status 403 The review-hog feature flag is off for this project.
Status 409 The pull request's cycle is busy (busy-guard): reviews are blocked while its comments are being resolved, and resolve-only runs are blocked while a review is running. Also returned with a code when a Standard review follows a published Deep review ('flash_after_full') or the PR owner has not opted in to resolution ('resolution_not_opted_in').
Status 429 GitHub rate-limited the App's token; retry after the Retry-After delay.
List all review hog validators
List the review-hog-validation-* skills visible to the requesting user — the canonical validator plus the customs they authored — flagging the one active for them. The canonical validator is auto-seeded active on the first read; a custom validator the user has not selected shows as inactive.
Required API key scopes
llm_skill:readExample request
GET /api /projects /:project_id /review_hog /validatorsExample response
Status 200 Every review validator on this project, flagging the one active for the user.
Update review hog validators
Make a review-hog-validation-* skill the single validator that runs on the requesting user's PR reviews, switching the user's other validators off in the same call. Only skills visible to the user — the canonical plus the customs they authored — can be selected; anything else 404s. Upserts the per-user config row, so selecting a freshly authored custom validator works in one call.
Required API key scopes
llm_skill:writePath parameters
- skill_namestring
Request parameters
- activeboolean
Response
Example request
PATCH /api /projects /:project_id /review_hog /validators /:skill_name










