This file provides guidance to AI coding agents (Claude Code, Codex CLI, etc.) when working with code in this repository.
IssueOps Command Action β a JavaScript GitHub Action that parses .command key=value, ... comments on issues / PRs and emits structured outputs (continue, params, command, actor, comment_id, issue_number). See action.yaml for the full I/O contract.
- Entrypoint:
src/index.tsβ bundled todist/index.jsvia@vercel/ncc.src/index.tsis the thin runner that callsrunfromsrc/main.ts; keepsrc/main.tsside-effect-free for testability. - Runtime: Node 24 (
runs.using: node24inaction.yaml) - Core parser:
src/parse.ts, built onparjscombinators
src/index.tsβ thin runner: invokesrun()fromsrc/main.tsand bridges toprocess.exitsrc/main.tsβ action logic (exportsrun); kept side-effect-free for testabilitysrc/parse.tsβ IssueOps command parsersrc/utils.tsβ small helperssrc/*.test.tsβ vitest tests, colocated with sourcesrc/inputs.tsβ GENERATED fromaction.yamlbyscripts/generate-inputs.ts. Do not edit by hand.src/unicode-regex.tsβ GENERATED byscripts/generate-unicode-regex.ts. Do not edit by hand.dist/β GENERATED bypnpm build. Committed so the runner can execute the action. Do not hand-edit.
- Setup:
mise install && pnpm i - Build:
pnpm build(bundles todist/via@vercel/ncc) - Test:
pnpm test(vitest). Single file:pnpm vitest run src/<file>.test.ts - Lint:
pnpm lint(oxlint, config in.oxlintrc.json) - Format:
pnpm format/pnpm format:check(oxfmt, config in.oxfmtrc.json) - Typecheck:
pnpm typecheck - Generate:
pnpm generate(docs + inputs + unicode-regex + format)
CI fails if dist/ or any generated file drifts from source. Always commit the regenerated output alongside the change.
| You changed... | Re-run | Commit these too |
|---|---|---|
Any non-generated file in src/ |
pnpm build |
dist/ |
action.yaml inputs / outputs |
pnpm generate |
dist/, src/inputs.ts, README.md |
| Unicode-handling logic | pnpm generate:unicode-regex |
src/unicode-regex.ts |
Docs in action.yaml (descriptions) |
pnpm generate:docs |
README.md |
- TypeScript: prefer
typeoverinterface(enforced bytypescript/consistent-type-definitions) - Parsing: use
parjscombinators, not regex (the codebase invests in parser correctness β preserve that) - ESM only (
"type": "module") - Formatter (
oxfmt): 120 char width, single quotes, trailing commas, sorted imports &package.json - Linter (
oxlint): bansany,ts-ignore, nested ternaries,console(allowed inscripts/)
- Conventional commits enforced by
commitlint(@commitlint/config-conventional). Examples:feat(parse): support escaped quotes in stringsfix(main): handle missing comment bodychore(deps): bump parjs to 1.3.10
- Pre-commit hook runs
lint-staged(oxfmt --write+oxlinton staged*.{js,ts}) - Releases are automated via
semantic-releaseon push tomain
- Pin every
uses:in.github/workflows/*to a full 40-char commit SHA, with a trailing# vX.Y.Zcomment for readability. - Do not use
@v4/@main/ floating-tag refs.
All source code, comments, commit messages, and documentation must be written in English.