Feature/add file history query#5
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new feature to query file history in Git repositories through a CLI command. The implementation introduces a file history query system that allows users to retrieve the commit history for specific files within repositories.
- Adds a new
filesCLI command group with ahistorysubcommand - Implements Git client interface and provider for file history operations
- Creates query models and services to retrieve and format file history data
Reviewed Changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.py | Adds the new files command group to the CLI |
| src/libs/git/service.py | Removes unused GitService class |
| src/libs/git/providers.py | Implements PythonGitClient with file history functionality |
| src/libs/container.py | Registers the new Git client provider |
| src/core/interfaces/git_client.py | Defines GitClient interface for file history operations |
| src/core/files/queries/queries.py | Implements FilesQueries class for retrieving file history |
| src/core/files/queries/models.py | Defines FileQueryModel data structure |
| src/core/container.py | Updates dependency injection configuration |
| src/app/files/group.py | Creates files command group |
| src/app/files/files.py | Implements history command functionality |
| src/app/container.py | Updates wiring configuration |
| tests/core/repos/operations/test_update_repo_operation.py | Minor formatting fixes |
| repo_path (str): The path to the file within the repository. | ||
|
|
||
| Returns: | ||
| Dict: A dictionary containing the file history. |
There was a problem hiding this comment.
The return type description is incorrect. The function returns Iterator[Commit], not a dictionary.
Suggested change
| Dict: A dictionary containing the file history. | |
| Iterator[Commit]: An iterator over `Commit` objects representing the file's history. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.