{"id":51778338,"url":"https://github.com/bborbe/github-pr-review-agent","last_synced_at":"2026-07-20T08:32:15.492Z","repository":{"id":370546098,"uuid":"1289524201","full_name":"bborbe/github-pr-review-agent","owner":"bborbe","description":"GitHub PR review agent — extracted from bborbe/maintainer. Reviews PRs via the agent framework; published image docker.io/bborbe/github-pr-review-agent.","archived":false,"fork":false,"pushed_at":"2026-07-16T14:07:08.000Z","size":321,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-20T08:32:14.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bborbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-04T21:35:02.000Z","updated_at":"2026-07-16T14:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bborbe/github-pr-review-agent","commit_stats":null,"previous_names":["bborbe/github-pr-review-agent"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bborbe/github-pr-review-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fgithub-pr-review-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fgithub-pr-review-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fgithub-pr-review-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fgithub-pr-review-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bborbe","download_url":"https://codeload.github.com/bborbe/github-pr-review-agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bborbe%2Fgithub-pr-review-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35681006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"ssl_error","status_checked_at":"2026-07-20T02:08:09.736Z","response_time":111,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-20T08:32:14.956Z","updated_at":"2026-07-20T08:32:15.478Z","avatar_url":"https://github.com/bborbe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-pr-review-agent\n\nAutonomous GitHub / Bitbucket **PR review agent**. Given a PR URL it clones the\nrepo, runs a Claude Code review inside a `claude-yolo` container, and posts the\nresult back as a PR review with a verdict (`approve` / `request-changes`).\n\nPart of the `bborbe` agent-maintenance fleet: the shared library lives in\n[`bborbe/maintainer`](https://github.com/bborbe/maintainer) (imported as\n`github.com/bborbe/maintainer`), the Helm chart ships there too, and the\npublished image is `docker.io/bborbe/github-pr-review-agent`. Extracted from the\nformer `bborbe/maintainer` monorepo (`agent/pr-reviewer`).\n\n## How it works\n\n1. Parse the PR URL → platform (GitHub / Bitbucket), owner, repo, PR number.\n2. Fetch PR metadata (source + target branch) via the platform REST API.\n3. Clone the repo at the PR head into a scratch dir.\n4. Run the Claude Code review (`/pr-review \u003ctarget-branch\u003e`) inside the\n   `claude-yolo` container against the diff.\n5. Parse the JSON verdict from the review output.\n6. Post a structured review — `APPROVE` / `REQUEST_CHANGES` (gated by\n   `autoApprove`) or a plain `COMMENT` — and clean up the clone.\n\n## Run modes\n\n| Mode | Entry | Use |\n|---|---|---|\n| Kubernetes Job | `main.go` (`/main` in the image) | Env-driven; spawned by the agent-task-executor from a Kafka task. This is how it runs in production. |\n| Local CLI | `cmd/run-task` | Takes a PR URL as a positional arg; flag-based config. For local runs / debugging. |\n\n```bash\ngo run ./cmd/run-task https://github.com/owner/repo/pull/42\ngo run ./cmd/run-task -v --comment-only https://github.com/owner/repo/pull/42\n```\n\n## Configuration\n\nEnv-driven (Kubernetes) — key variables:\n\n| Var | Purpose |\n|---|---|\n| `APP_ID` / `INSTALLATION_ID` | GitHub App identity (`Ben's Pull Request Reviewer`) |\n| `PEM_KEY` | GitHub App private key (mounted from a Secret) |\n| `REPO_ALLOWLIST` | Repos the agent may review (e.g. `github.com/bborbe/*,!github.com/bborbe/go-skeleton`) |\n| `BOT_GITHUB_LOGIN` | The App's bot login, used to detect its own prior reviews |\n| `REVIEW_MODE` | Review depth (e.g. `selector`) |\n| `BITBUCKET_TOKEN` | Bitbucket Server bearer token (Bitbucket PRs only) |\n\nPer-repo behavior is driven by the target repo's `.maintainer.yaml`\n(`prReviewer.autoApprove`) — read from the PR head. See\n[`bborbe/maintainer`](https://github.com/bborbe/maintainer) for that schema.\n\n## Verdict contract\n\nThe Claude Code review must emit a JSON block:\n\n```json\n{\"verdict\": \"approve|request-changes\", \"reason\": \"\u003cone-liner\u003e\"}\n```\n\nFallback: a heuristic section-header scan (`## Must Fix`, `## Blocking`).\nHorizontal rules (`---`) are not treated as must-fix content.\n\n## Smoke-test PR\n\n**https://github.com/bborbe/maintainer/pull/2** — `test: delete-this-pr-never`.\nPermanent test fixture (trivial diff). Use it for any local or k8s smoke test.\n**Do not close, do not merge.**\n\n## Layout\n\n```\n.                    lib imported from github.com/bborbe/maintainer\n├── main.go          Kubernetes Job entry (env-driven; /main in the image)\n├── cmd/\n│   ├── run-task/    local CLI (PR URL as positional arg)\n│   ├── cli/         supporting CLI\n│   └── mint-iat/    GitHub App installation-token smoke tool\n├── pkg/             URL parse, config, git clone, GitHub/Bitbucket clients,\n│                    App auth, review runner, verdict parser, posters\n├── docs/            architecture.md · github-app-setup.md · pr-post-back.md\n└── helm chart + shared lib live in bborbe/maintainer\n```\n\nSee [`docs/architecture.md`](docs/architecture.md) for the three-phase design\n(planning → execution → review) and the verdict rubric, and\n[`docs/github-app-setup.md`](docs/github-app-setup.md) for the App auth flow.\n\n## Build\n\n```bash\nmake precommit          # fmt, generate, test, lint, vet, vuln, license\nVERSION=vX.Y.Z make buca # build + push docker.io/bborbe/github-pr-review-agent:vX.Y.Z\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborbe%2Fgithub-pr-review-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbborbe%2Fgithub-pr-review-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbborbe%2Fgithub-pr-review-agent/lists"}