{"id":25621733,"url":"https://github.com/fox-techniques/hephai-pr-doctor","last_synced_at":"2026-06-21T17:31:27.546Z","repository":{"id":276038473,"uuid":"927129776","full_name":"fox-techniques/hephai-pr-doctor","owner":"fox-techniques","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T00:15:22.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T06:15:43.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fox-techniques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-04T13:05:20.000Z","updated_at":"2025-02-25T00:15:26.000Z","dependencies_parsed_at":"2025-02-10T21:30:51.319Z","dependency_job_id":"11691131-ba68-4b06-829c-26b7c7dc334d","html_url":"https://github.com/fox-techniques/hephai-pr-doctor","commit_stats":null,"previous_names":["fox-techniques/hephaistos-pr-doctor","fox-techniques/hephai-pr-doctor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fox-techniques/hephai-pr-doctor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhephai-pr-doctor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhephai-pr-doctor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhephai-pr-doctor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhephai-pr-doctor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fox-techniques","download_url":"https://codeload.github.com/fox-techniques/hephai-pr-doctor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhephai-pr-doctor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34620358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-02-22T09:44:58.097Z","updated_at":"2026-06-21T17:31:27.527Z","avatar_url":"https://github.com/fox-techniques.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HEPHAI-PR-Doctor\n\n**HEPHAI-PR-Doctor** is an AI-powered GitHub Action for **automated PR review, test generation, and code quality analysis**. It leverages **OpenAI models** to evaluate pull requests, suggest improvements, and generate test cases.\n\n## Features\n\n- **Automated PR Analysis** – Assigns a quality score based on file changes, complexity, and AI-inferred file importance.  \n- **AI-Powered Test Suggestions** – Generates test cases for changed files to improve coverage.  \n- **Repository Structure Analysis** – Evaluates file types (e.g., security-sensitive, config, tests) to weight their impact.  \n- **GitHub Actions \u0026 Local Testing** – Works as a GitHub Action or can be executed locally for testing.  \n- **Automated PR Comments** – Posts a structured review summary with test suggestions directly on GitHub PRs.  \n\n\n## Configuration\n\nHEPHAI-PR-doctor requires:\n\n- **`GITHUB_TOKEN`** (Automatically available in GitHub Actions)\n- **`OPENAI_API_KEY`** (Set as a repository secret to use OpenAI for PR reviews and test generation)\n\n## How It Works\n\n1. Fetches Repository Structure – Retrieves the list of files in the repo (GitHub API or local scan).\n2. Analyzes File Weights with AI – Assigns weights to files based on importance (security, tests, config).\n3. Fetches PR Data – Reads PR details, including changed files, additions, deletions, and linting issues.\n4. Scores the PR – Calculates a PR quality score (0-100) using file importance, size, and complexity.\n5. Generates Test Cases – Uses AI to suggest unit and integration tests for modified files.\n6. Saves a Test Report – Outputs a structured JSON report with the analysis results.\n7. Posts a PR Comment – (If in GitHub Actions) Posts a review summary with test recommendations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-techniques%2Fhephai-pr-doctor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffox-techniques%2Fhephai-pr-doctor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-techniques%2Fhephai-pr-doctor/lists"}