Skip to main content

Early Catch for Pull Request

Early Catch for Pull Request extends the power of Early’s AI test generation into your GitHub workflow.
It automatically generates high-quality unit tests the moment you open a Pull Request — ensuring issues are caught before merging.


How It Works

  1. Trigger: Runs on pull_request events (configurable).
  2. Detect Changes: Scans changed files and identifies affected functions.
  3. Coverage-Aware:
    • If a public function has coverage below the minimum threshold (default: 0%), it’s selected for test generation.
    • Stops generating once coverage exceeds the upper limit (default: 80%) to prevent unnecessary test churn.
  4. Generate & Commit: Produces only fully working (green) tests and commits them back to the PR branch.
  5. Current Support: TypeScript + Jest.

Why Use It?

  • Catch gaps early in the PR stage
  • Consistent coverage across the team
  • No manual setup per PR — fully automated
  • Only passing tests committed