โ 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 PRsopenedโ if PRs are opened when ready
Avoid synchronize unless you want to retry on every commit.
See Trigger example
๐ฏ 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?โ
- JavaScript / TypeScript
- Python
- โ Jest (required today)
- ๐ก Vitest (coming soon)
- โช Mocha (planned)
If Jest isn't configured, test generation won't run.
- โ pytest (auto-detected)
The test framework is automatically set to pytest for Python projects. No configuration is needed.
๐ Will it overwrite my existing test files?โ
No. It only generates new test files. Existing files are left unchanged.
๐ Where are test files stored?โ
- JavaScript / TypeScript
- Python
Set with test-structure:
siblingFolder- next to source filerootFolder- centralizedtests/folder
See Test Structure
Test files are placed in .early.test/ sibling folders next to the source file:
src/
utils/
helpers.py
helpers.early.test/
test_my_function_early.py
test_another_function_early.py
Each testable function gets its own test file.
๐ฆ 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?โ
- JavaScript / TypeScript
- Python
Yes. Set:
auto-commit: false
This will skip auto-commit so you can review changes manually.
Yes. Set:
AUTO_COMMIT: "false"
This will skip auto-commit so you can review generated test files manually.
๐งฑ Does it support monorepos?โ
- JavaScript / TypeScript
- Python
Yes โ if each workspace/package has a valid Jest config. Early-Catch runs Jest per-package for coverage analysis.
Yes โ the agent scans for Python files changed in the PR regardless of project structure.
๐ป 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?โ
- JavaScript / TypeScript
- Python
Use the following inputs to auto-fix files before validation/commit:
| Input | Purpose |
|---|---|
lint-command | ESLint fixes (e.g., eslint $early_filename --fix) |
prettier-command | Formatting (e.g., prettier $early_filename --write) |
If not set, commits may fail if hooks or CI block unformatted files.
Lint and formatting hooks are not yet supported for Python projects. Generated test files follow standard pytest conventions.
๐ 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
.pyfiles, they are treated as Python - When
TEST_FRAMEWORK=pytestis set, the agent uses the py-agent for test generation
๐ฌ Still need help?โ
- ๐ฌ Email us at support@startearly.ai
- Slack (for invited teams)