-
Notifications
You must be signed in to change notification settings - Fork 864
feat: use gitpython for git stuff #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🌐 Preview environment for PR #504 |
f2f4fdf
to
f411418
Compare
ea07d37
to
4a462d3
Compare
5d6a3c6
to
4561fc1
Compare
82b1452
to
d228c47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
git
command 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
IngestErrorResponse
import 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>
Closes #412