This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Versioner GitHub Action - a TypeScript GitHub Action that sends build and deployment events to the Versioner API. Node.js 20, @actions/core, Axios.
This repo is part of the Versioner ecosystem. Before starting work:
- Use the
/kanban-markdownskill or read../.devtool/features/for current status and priorities - Read relevant feature docs from
../docs/specs/ - Update feature file status in
../.devtool/features/as you complete tasks, add entries to../changelog.md
All commands use just (run just to list all):
just setup_local_dev # npm install
just build # ncc build to dist/index.js (self-contained bundle)
just run_tests # Jest (80% coverage threshold)
just test_coverage # Jest with coverage report
just lint # ESLint (strict: explicit return types, no any)
just format # Prettier
just ci # format -> lint -> build -> testThe dist/ directory is committed (GitHub Actions requires it).
src/index.ts- Entry point; routes to build or deployment event handling based onevent_typeinputsrc/inputs.ts- Input validation and parsing (from GitHub Actions inputs or env vars)src/api-client.ts- HTTP client for Versioner API with error handling for preflight rejections (409, 423, 428)src/github-context.ts- Extracts GitHub metadata (repo, SHA, branch, actor, workflow URL) and auto-captures env vars withvi_gh_prefixsrc/types.ts- TypeScript interfaces for payloads and responsesaction.yml- Action definition with inputs/outputs
- Follow existing code patterns and style
- Blank lines must be completely empty (no whitespace-only lines)
- Add tests for new features; ensure tests pass before committing
- Prefer editing existing files over creating new ones