Repository Guidelines
Project Structure & Module Organization
src/— TypeScript sources for the composite action (dependency-review.ts,check-ossf.ts,check-guarddog.ts,frozen-install.ts).dist/— Built JS (committed). Keep in sync withsrc/viapnpm build.tests/— Jest tests (*.test.ts).action.yml— Composite GitHub Action entry..github/workflows/— CI and self-test workflows.
Build, Test, and Development Commands
- Install:
pnpm install --frozen-lockfile(use Corepack:corepack enable). - Lint:
pnpm lint(Biome). - Test:
pnpm testorpnpm test:watch(Jest + ts-jest). - Build:
pnpm build(tsup →dist/). CI fails ifdist/is out of date. - Example run:
node dist/check-ossf.js changed.json /tmp/ossf.
Coding Style & Naming Conventions
- Language: TypeScript (
strict: true). TargetES2020, moduleCommonJS. - Indentation: 2 spaces; prefer double quotes and semicolons (match existing files).
- Files: kebab-case (e.g.,
check-guarddog.ts). - Symbols:
camelCasevariables/functions,PascalCasetypes/classes. - Linting/formatting:
pnpm lint(Biome) must pass before PR.
Testing Guidelines
- Framework: Jest (
nodeenv) withts-jest. - Location/pattern:
tests/**/**.test.ts(config also picks upsrc/**). - Behavior: avoid real network; prefer stubs/env overrides. Verify file outputs in temp dirs.
- Coverage: reports to
coverage/(no enforced threshold). Runpnpm testlocally.
Commit & Pull Request Guidelines
- Use Conventional Commits seen in history:
feat:,fix:,docs:,refactor:,improve:.- Example:
feat: add multi-ecosystem frozen install
- Example:
- PRs must include:
- Clear description and linked issues (e.g.,
Closes #123). - Rationale and risk notes; logs/screenshots when behavior/outputs change.
- Updated
dist/(runpnpm build) and docs (README.md) if inputs/behavior change. - Green CI (lint, tests, build).
- Clear description and linked issues (e.g.,
Security & Configuration Tips
- Do not commit secrets.
dependency-reviewrequiresGITHUB_TOKENat runtime (CI provides it). - Local Node: use
lts/*or Node 18+; project CI builds with pnpm + Corepack. - When adding new action inputs/steps, update
action.yml, tests, and README accordingly.