fix: add --quiet/--json CLI flags, fix Claude Code hooks template#100
Open
gzenz wants to merge 1 commit intotirth8205:mainfrom
Open
fix: add --quiet/--json CLI flags, fix Claude Code hooks template#100gzenz wants to merge 1 commit intotirth8205:mainfrom
gzenz wants to merge 1 commit intotirth8205:mainfrom
Conversation
Author
|
fixes #97 |
c514e1a to
15db376
Compare
- Add -q/--quiet flag to build, update, and status commands - Add --json flag to status command for machine-readable output - Fix generate_hooks_config() to use correct Claude Code schema: nested "hooks" arrays with "type": "command" on each entry - Replace invalid PreCommit hook event with PreToolUse + if: "Bash(git commit*)" filter - Update docs and tests to match
15db376 to
1270c80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-q/--quietflag tobuild,update, andstatusCLI commands to suppress stdout output--jsonflag tostatuscommand for machine-readable outputgenerate_hooks_config()to produce valid Claude Codesettings.jsonschema:"hooks": [{"type": "command", ...}]structure (was flat, missing"type")PreCommithook event withPreToolUse+if: "Bash(git commit*)"filter"matcher"field to all hook entriesContext
The
hooks/hooks.json(MCP plugin path) had the correct Claude Code schema from day one, butgenerate_hooks_config()inskills.py(used bycode-review-graph init) was generating an invalid flat structure. The--quietand--jsonflags referenced in the template also didn't exist. This meant anyone usingcode-review-graph initgot a brokensettings.json.Test plan
ruff checkpassesuv run pytest tests/ --tb=short -q)code-review-graph update --quietproduces no output (exit 0)code-review-graph status --jsonoutputs valid JSONcode-review-graph build --quietproduces no output