JevPR
Risk review of a pull request, decided rather than written.
Hexye’s bot reads a pull request and asks Jev how risky the change is, so a review starts from a rating instead of a wall of generated prose.
# JevPR JevPR is a GitHub App that routes pull-request review work using [Jev By TypeSafe](https://typesafe.ai/) as the decision engine. When a pull request is opened or updated, the app ingests the GitHub webhook, normalizes the pull request context, sends it to Jev, and receives a structured decision such as `LOW`, `NORMAL`, or `SPECIALIST`. A deterministic policy layer then maps that decision to an action like auto-approval, a request for review, or a check-run update. ## Architecture - `api/` exposes FastAPI endpoints for health and webhook ingestion. - `providers/` isolates Jev behind a provider boundary. - `decisions/` contains the normalized context model, decision result model, and routing policy. - `services/` coordinates webhook handling and evaluation. - `workers/` contains Celery worker wiring for asynchronous GitHub work. - `db/` contains SQLAlchemy models and repository helpers. ## Configuration Runtime settings are loaded from environment variables and an optional YAML file at `.github/jevpr.yml` in the repository. If the YAML file is not present, a default policy is used. The YAML file controls both the action mapping and the GitHub reviewers that may be assigned by policy. Example: ```yaml reviewers: - username: alice github_id: 1001 actions: LOW: action: approve NORMAL: action: request_review reviewers: - alice ``` ## Local Development 1. Create a virtual environment. 2. Install the package in editable mode with dev dependencies. 3. Start the API with `uvicorn JevPR.main:app --reload`. IT IS HIGHLY RECOMMENDED TO DEPLOY WITH DOCKER ## Docker Use `docker compose up -d --build` to start the API, worker, PostgreSQL, and Redis. Port rules in Docker mode: - `API_PORT` controls the host port for the FastAPI service. The contain