feat: add agentreview github webhook reviewer #28
Reference in New Issue
Block a user
Delete Branch "benvin/agentreview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GitHub PRs get no automated review today. A webhook-driven Claude Code reviewer posts Copilot-style feedback on each newly opened PR automatically.
agentreview serve: HMAC-verifiedPOST /webhookandGET /healthz--allowrepos only, async with bounded concurrency and per-PR dedupfull_name, auth host-scoped, symlinks as plain filesclaude -pread-only (Read/Grep/Glob, restricted) over the head clone and a size-capped PR diffCOMMENTreview; failures are logged with secrets redacted, outputs containing secrets are not postedx -> /proc/self/environ) that Read/Grep follow out ofwork/, exposing the OAuth/gateway token which is then posted publicly; nothing tests this → after checkout remove all symlinks underrepo/(or prove--restrictedresolves them) and add a test with a hostile symlink.textcontains any of githubToken or the authEnv values.repository.clone_url→ add an allowed-owner/repo flag, or confirm the secret is per-repo.s.sem(one per distinct PR) → cap the pending queue and drop with a log when full.review.go # ...breaks the column alignment of the neighbouringcmd/lines → align; also "agentreview run" is not a command, reword to "review pipeline".http.extraHeaderapplies to every URL git talks to, including redirects, and--github-url/--github-apiaccept plainhttp://(token sent in clear) → scope the header tohttp.<githubWeb>/.extraHeader, sethttp.followRedirects=false, and reject non-https URLs at startup.review failed: %vlogs (main.go:347; claude result and stderr in review.go:180/:241) go unscrubbed → run logged errors through the same redaction and also match the base64/URL-encoded forms of each secret.s.semwith no cap → cap pending reviews (reject with 503) or fix the body.HeadSHAdiffers, and failed reviews are never retried, so areopened/ready_for_reviewduring a run is silently lost → key on SHA or requeue once after the running review ends.io.ReadAllis unbounded → wrap inio.LimitReaderand fail past a cap.--allow "a, b"keeps the leading space, sobsilently never matches (fails closed but confusing) →strings.TrimSpaceeach entry.TestStartBoundsConcurrencyrelies on 20ms sleeps → use channels to hold reviews open.