feat: use gitpython for git stuff#504
Merged
NicolasIRAGNE merged 11 commits intomainfrom Aug 11, 2025
Merged
Conversation
|
⚙️ Preview environment was undeployed. |
f2f4fdf to
f411418
Compare
ea07d37 to
4a462d3
Compare
5d6a3c6 to
4561fc1
Compare
82b1452 to
d228c47
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase to use GitPython for Git operations instead of directly executing Git commands through subprocess calls. This change improves code maintainability, error handling, and provides better Git integration.
- Replaces direct
gitcommand execution with GitPython library calls - Updates authentication mechanism to use GitPython's configuration system
- Refactors test suite to mock GitPython instead of subprocess calls
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds GitPython dependency |
src/gitingest/utils/git_utils.py |
Core refactor from subprocess to GitPython API |
src/gitingest/clone.py |
Updates clone operations to use GitPython |
tests/test_git_utils.py |
Refactors tests to mock GitPython instead of subprocess |
tests/test_clone.py |
Updates clone tests for GitPython integration |
tests/conftest.py |
Adds GitPython mocking infrastructure |
src/server/query_processor.py |
Minor string formatting change |
Dockerfile |
Updates pip install to include mcp extra |
.pre-commit-config.yaml |
Adds GitPython to pre-commit dependencies |
Comments suppressed due to low confidence (2)
src/gitingest/utils/git_utils.py:311
- This line appears to be in the wrong file. The
IngestErrorResponseimport and usage belongs insrc/server/query_processor.py, not ingit_utils.py.
msg = f"Invalid GitHub URL: {url!r}"
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Closes #412