Skip to content

fix: add --skip-git-repo-check to review command#111

Open
kirkluokun wants to merge 1 commit intotuannvm:mainfrom
kirkluokun:fix/review-skip-git-repo-check
Open

fix: add --skip-git-repo-check to review command#111
kirkluokun wants to merge 1 commit intotuannvm:mainfrom
kirkluokun:fix/review-skip-git-repo-check

Conversation

@kirkluokun
Copy link

@kirkluokun kirkluokun commented Feb 8, 2026

Summary

  • The review tool handler was missing the --skip-git-repo-check flag, causing "Not inside a trusted directory" errors when invoked via MCP
  • The codex (exec) handler already includes this flag (handlers.ts#L100, #L140), but it was overlooked for the review handler
  • Added the same --skip-git-repo-check flag to the review command builder

Test plan

  • npm run build passes
  • npm test - all 70 tests pass (9 suites)
  • Manual verification: call review tool via MCP with workingDirectory parameter

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced the review tool to skip git repository trust checks, enabling code reviews to proceed smoothly in restricted git repository environments.

The review tool handler was missing the --skip-git-repo-check flag,
causing "Not inside a trusted directory" errors when invoked via MCP.
The codex (exec) handler already includes this flag, but it was
overlooked for the review handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

Walkthrough

A --skip-git-repo-check flag is appended to the command arguments in ReviewToolHandler's codex review command construction, allowing the review command to bypass the git repository trust check without altering the control flow.

Changes

Cohort / File(s) Summary
ReviewToolHandler Git Check Flag
src/tools/handlers.ts
Added --skip-git-repo-check flag to the codex review command arguments, positioned after workingDirectory handling.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A flag hops by, so swift and small,
Git trust checks now skip them all,
Through handlers deep, it finds its way,
Skipping repos—hip hip hooray!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the --skip-git-repo-check flag to the review command to resolve trust directory errors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments