Skip to main content

โ“ Frequently Asked Questions โ€” Early-Catch (GitHub Action)

This page covers PR-specific behavior. For shared questions (API keys, tokens, install), see the Fundamentals FAQ.


๐Ÿ” Do I need a GitHub token even if auto-commit is disabled?โ€‹

Yes. The token input is always required to read PR metadata and post the summary comment. Use:

token: ${{ secrets.GITHUB_TOKEN }}

For token scopes and alternatives, see Token Requirements


๐Ÿ”‘ Where do I get my API key?โ€‹

See API Key


๐Ÿ”” Which PR event should I use to trigger Early-Catch?โ€‹

Recommended:

  • ready_for_review โ€” if you use Draft PRs
  • opened โ€” if PRs are opened when ready

Avoid synchronize unless you want to retry on every commit.

See Trigger example

See Event Type Guidance


๐ŸŽฏ What's the current coverage threshold?โ€‹

0%. Early-Catch only targets functions with zero coverage today. Threshold will be configurable in a future release.


๐ŸŒ Which languages are supported?โ€‹

  • โœ… JavaScript
  • โœ… TypeScript
  • โœ… Python (pytest)

๐Ÿงช Which test frameworks are supported?โ€‹

  • โœ… Jest (required today)
  • ๐ŸŸก Vitest (coming soon)
  • โšช Mocha (planned)

If Jest isn't configured, test generation won't run.


๐Ÿ“ Will it overwrite my existing test files?โ€‹

No. It only generates new test files. Existing files are left unchanged.


๐Ÿ“‚ Where are test files stored?โ€‹

Set with test-structure:

  • siblingFolder - next to source file
  • rootFolder - centralized tests/ folder

See Test Structure


๐Ÿ“ฆ Will every PR always generate tests?โ€‹

No. Only if the PR includes zero-covered functions. Otherwise, the action finishes without writing files.


โœ… Will it ever commit broken tests?โ€‹

Never. Only tests that compile cleanly and pass are committed.


๐Ÿ‘€ Can I review the tests before commit?โ€‹

Yes. Set:

auto-commit: false

This will skip auto-commit so you can review changes manually.


๐Ÿงฑ Does it support monorepos?โ€‹

Yes โ€” if each workspace/package has a valid Jest config. Early-Catch runs Jest per-package for coverage analysis.


๐Ÿ’ป Can I run Early-Catch locally?โ€‹

No. Use the Early CLI instead for local or non-GitHub CI environments.


๐Ÿงน What if my repo has lint/format rules?โ€‹

Use the following inputs to auto-fix files before validation/commit:

InputPurpose
lint-commandESLint fixes (e.g., eslint $early_filename --fix)
prettier-commandFormatting (e.g., prettier $early_filename --write)

If not set, commits may fail if hooks or CI block unformatted files.


๐Ÿ How does the agent know if my project is Python?โ€‹

The CLI auto-detects the language by inspecting changed files in the PR:

  • If the PR contains .py files, they are treated as Python
  • When TEST_FRAMEWORK=pytest is set, the agent uses the py-agent for test generation

๐Ÿ’ฌ Still need help?โ€‹