๐งช GitHub PR Agent โ Native GitHub Automation
The GitHub PR Agent runs automatically in GitHub Actions when a pull request is opened or updated. It detects changed code, analyzes coverage, generates targeted unit tests, and commits them back to the PR branch โ all with zero manual effort.
Supported languages: JavaScript, TypeScript, and Python.
๐ When to Useโ
Use the GitHub PR Agent when:
- You're using GitHub Actions
- You want fully automated test generation per pull request
- Your team prefers a zero-config, GitHub-native workflow
- You want to block merges without new tests
โ๏ธ How It Worksโ
- JavaScript / TypeScript
- Python
- Triggered by PR open, update, or ready-for-review events
- Detects changed files in the PR diff
- Runs your existing test suite (Jest) to measure coverage
- Identifies under-tested functions
- Generates AI-powered Jest tests for those functions
- Commits valid tests (only if they pass and compile)
- Posts a PR comment summarizing coverage and results
- Triggered by PR open, update, or ready-for-review events
- Detects changed Python files in the PR diff
- Delegates to the py-agent for analysis
- Extracts testable functions and class methods from changed files
- Generates AI-powered pytest tests for those functions
- Commits valid tests to the PR branch
- Posts a PR comment summarizing results
๐ Requirementsโ
- JavaScript / TypeScript
- Python
- โ Your repo must use GitHub Actions
- โ Your project must use TypeScript or JavaScript
- โ You must have an existing Jest test setup
- โ Node.js 20+ must be available in your CI
- โ
A valid
API_KEYmust be configured - โ NPM installation โ
- โ Token Permissions โ
- โ Memory Tuning โ
- โ Your repo must use GitHub Actions
- โ Your project must use Python
- โ Node.js 20+ and Python 3.11+ must be available in your CI
- โ
Both
@earlyai/cli(npm) andpy-agent(pip) must be installed - โ
A valid
API_KEYmust be configured - โ Token Permissions โ