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 (coming soon)

No support for other languages yet.


πŸ§ͺ 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 Jest 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.


πŸ’¬ Still need help?​