langflow
langflow copied to clipboard
feat: add GitExtractor component
This pull request introduces the GitExtractor component for analyzing Git repositories. Key features:
- Repository Info: Extracts branch, remotes, and commit details
- Statistics: Calculates file counts, sizes, and line numbers
- Directory Structure: Generates complete folder tree
- File Content: Extracts text files with binary handling
- Memory Safe: Implements content truncation for large repos
- Error Handling: Graceful error recovery and resource cleanup
Hi @ogabrielluiz ,
Thank you for the review! I've implemented the suggested changes:
- Converted all methods to async using async/await
- Added asynccontextmanager for the tmpdir operations
- Implemented automatic cleanup using the context manager
Let me know if you'd like me to make any additional adjustments to the implementation.
Good Work! @raphaelchristi Please follow up if the tests in CI Fails!