Skip to content

FEAT-9: feat(distribution): official GitHub Action, pre-commit hook, and container image #1940

Description

@gfargo

Category: distribution
Gap: No action.yml, no Dockerfile, no .pre-commit-hooks.yaml at the repo root. packaging/ contains a single Homebrew formula. Shell completions do exist (src/index.ts:247-293, bash/zsh/fish) and install.sh covers curl-install — so the gap is specifically CI and hook-framework distribution.
Why it matters: coco review --severity 7 and coco lint are CI-shaped features with no CI-shaped delivery: every adopter hand-writes a workflow that installs Node 22, npm-installs git-coco, and plumbs OPENAI_API_KEY. The repo's own .github/workflows/ai-review.yml is evidence the demand exists in-house. A pre-commit hook only exists as coco's own bespoke prepare-commit-msg installer (src/commands/hooks/manageHooks.ts), which the millions of repos on the pre-commit framework cannot use.
Sketch: (1) action.yml — composite action wrapping setup-node + npm i -g git-coco@<ref> + a command input, with severity/json passthrough and outputs for the findings JSON. (2) .pre-commit-hooks.yaml declaring a coco-commit-msg hook. (3) Dockerfile on node:22-alpine with gh and glab preinstalled, published from publish-release.yml alongside npm. (4) A README/wiki "Use coco in CI" section.
Already-there leverage: --json, --quiet, --repo, and --severity exit-code gating already make every command CI-friendly; bin/smokeCli.ts gives a ready smoke target for the container; publish-release.yml + update-homebrew-tap.yml show the release-fanout pattern to copy.
Effort notes / risks: M spread across three independent deliverables — file as three issues under one umbrella. The container needs a decision on whether forge CLIs are baked in (size) or expected from the host.


P1 — significant gaps and differentiating bets


Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions