Add temp-clone support to run fyai on remote Git repos#4
Merged
Conversation
atrtde
approved these changes
Feb 9, 2026
There was a problem hiding this comment.
Pull request overview
Adds support for running fyai against a remote Git repository by cloning it into a temporary workspace, running the existing processing pipeline on that clone, and relying on tempdir cleanup afterward.
Changes:
- Introduces
--repoand optional--repo-branchCLI flags and routes execution through a repository-clone path. - Adds
src/repository.rswithgit clone --depth 1+ tempdir-based cleanup, and overridesConfig.directoryto point at the clone. - Documents the new remote-run workflow in README and adds unit tests around clone/run behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/repository.rs |
Implements tempdir clone + runs existing pipeline on the cloned directory. |
src/main.rs |
Hooks --repo flow into main execution after config merge. |
src/cli.rs |
Adds --repo / --repo-branch flags to clap CLI. |
README.md |
Documents new flags and remote usage example. |
src/tests/repository_tests.rs |
Adds tests for running on a cloned repo and temp cleanup behavior. |
src/tests/mod.rs |
Registers the new repository test module. |
Cargo.toml |
Moves tempfile into runtime dependencies. |
Comments suppressed due to low confidence (1)
Cargo.toml:28
[dev-dependencies]is now empty after movingtempfileto normal dependencies. Consider removing the empty section to keep Cargo.toml tidy.
[dev-dependencies]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Enable running fyai against a GitHub/GitLab repository by cloning into a temporary workspace, processing there, and leaving no residue beyond the output.
--repo(with optional--repo-branch) flags hook main flow to a remote-run path after normal config merge.repository.rsclones withgit --depth 1, swapsConfig.directoryto the temp clone, invokes existing processing, and relies onTempDirdrop for cleanup.Example:
Original prompt