src/: primary source for LCOV parsing, comment generation, GitHub API calls, the local CLI, and unit tests.dist/: bundled GitHub Action runtime output consumed byaction.yml; treatdist/main.jsas a generated release artifact, not a hand-edited source area..github/workflows/: PR validation and action self-use in CI.action.yml: action inputs and runtime contract.README.md: user-facing usage, contributor commands, and release notes.
- Run all commands from the repository root.
- Use
yarnas the package manager and script entrypoint. yarn: install dependencies.yarn eslint: run lint checks for the JavaScript codebase.yarn test: run Jest tests and generate LCOV coverage output.yarn build: rebuilddist/main.js; run this after source changes that affect action behavior and before opening a PR that changes shipped behavior.yarn format: apply Prettier to repository JavaScript files.yarn local -- ./coverage/lcov.info [./coverage/lcov-base.info]: preview the generated coverage comment locally from LCOV files.- Smallest meaningful validation:
- For most source changes, run
yarn eslintandyarn test. - Run
yarn buildwhenever you change action logic, runtime wiring, or anything that can affectdist/main.js.
- For most source changes, run
- No separate typecheck command is defined in this repository.
- Contribute through a fork and pull request rather than direct pushes.
- Expect the pre-commit hook to run
lint-stagedon staged*.jsfiles. - Staged JavaScript files are auto-fixed with ESLint and formatted with Prettier before the commit completes.
- Before opening a PR that changes shipped action behavior, ensure the committed
dist/main.jsmatches a freshyarn build.
- Keep
dist/main.jscommitted and in sync with source changes; CI rebuilds it and fails on drift. - Keep changes compatible with the published GitHub Action runtime declared in
action.yml(node16), even though CI validates the repo on Node 20. - Do not treat live PR comment posting as a normal local workflow: the action requires GitHub pull request context and a
github-token. - For local development, prefer
yarn testand theyarn localCLI helper instead of trying to exercise GitHub API side effects directly. coverage/is generated test output ignored by Git; do not treat it as source or a committed artifact.