Skip to content

feat(daemon): allow git fetch as a raw subcommand#1167

Merged
guitavano merged 1 commit intomainfrom
feat/allow-git-fetch-subcommand
Apr 10, 2026
Merged

feat(daemon): allow git fetch as a raw subcommand#1167
guitavano merged 1 commit intomainfrom
feat/allow-git-fetch-subcommand

Conversation

@guitavano
Copy link
Copy Markdown
Contributor

@guitavano guitavano commented Apr 10, 2026

Summary

  • Adds "fetch" to ALLOWED_SUBCOMMANDS in daemon/git.ts so that git fetch origin can be executed via the /git/raw endpoint.

Test plan

  • Call /git/raw with args ["fetch", "origin"] and confirm it executes successfully.
  • Confirm blocked flags like --force still get rejected when used with fetch.

Made with Cursor


Summary by cubic

Allows running git fetch via the /git/raw endpoint by adding fetch to ALLOWED_SUBCOMMANDS. This enables git fetch origin while existing blocked flags (e.g., --force) remain enforced.

Written for commit 65ee3a4. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • The /git/raw endpoint now supports the fetch subcommand for git operations, enabling previously unavailable functionality.

Adds "fetch" to ALLOWED_SUBCOMMANDS so that `git fetch origin` can be
executed via the /git/raw endpoint.

Made-with: Cursor
@github-actions
Copy link
Copy Markdown
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 1.195.3 update
  • 🎉 for Minor 1.196.0 update
  • 🚀 for Major 2.0.0 update

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a369d823-1e38-41a8-a034-8a6fb9ef84f8

📥 Commits

Reviewing files that changed from the base of the PR and between 200f2b5 and 65ee3a4.

📒 Files selected for processing (1)
  • daemon/git.ts

📝 Walkthrough

Walkthrough

The ALLOWED_SUBCOMMANDS allowlist in the git daemon is extended to include the fetch subcommand, enabling /git/raw endpoint requests with fetch as the first argument to pass validation.

Changes

Cohort / File(s) Summary
Git Subcommand Allowlist
daemon/git.ts
Added fetch to the ALLOWED_SUBCOMMANDS whitelist for the /git/raw endpoint.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 Fetch is here, hop and cheer!
The allowlist grows with one more gear,
Git commands flow, no more delay,
Rabbit blessed this sunny day! 🌞

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/allow-git-fetch-subcommand

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.

@guitavano guitavano merged commit 712afd9 into main Apr 10, 2026
5 of 6 checks passed
@guitavano guitavano deleted the feat/allow-git-fetch-subcommand branch April 10, 2026 14:47
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