Derrickp/dev 281 verify comments against historical comments#300
Open
derrickpersson wants to merge 16 commits into
Open
Derrickp/dev 281 verify comments against historical comments#300derrickpersson wants to merge 16 commits into
derrickpersson wants to merge 16 commits into
Conversation
Contributor
Author
|
/squire update-description |
saumilptl
reviewed
Nov 14, 2024
saumilptl
reviewed
Nov 14, 2024
saumilptl
reviewed
Nov 14, 2024
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.
Pull request summary created by Squire AI
Summary
This pull request introduces significant enhancements to comment management and synchronization with GitHub within the codebase. It replaces the existing comment filtering and reaction synchronization functionalities with new services, namely
FilterCommentsServiceandSyncFeedbackService. The database schema was updated to include new foreign key constraints and a boolean column for tracking changes, along with the addition ofCommentRepositoryfor better comment retrieval. Additionally, new utilities for parsing file contents into abstract syntax trees (AST) were introduced alongside corresponding tests to ensure robust handling of comments and code changes.74b9fda...bfe58a3
File Summary
File Changes:
.pre-commit-config.yaml: Added exclusion fortests/test_has_applied_change.pyto the trailing-whitespace hook.workflow.py: Replacedfilter_top_commentfunction withFilterCommentsService. Removed the old implementation offilter_top_comment.di.py: AddedCommentRepositoryto the repository bindings with a provider method.comment.py: AddedForeignKeyconstraints topull_request_idandreview_id. Introducedhas_made_changesboolean column to track user changes.pull_request.py: AddedForeignKeyconstraint torepository_idcolumn.__init__.py: Imported and addedCommentRepositoryto the repository list.pull_request_manager.py: RenamedSyncCommentReactionstoSyncCommentFeedbackin multiple instances.clear.py: ReplacedSyncReactionsServicewithSyncFeedbackServiceinClearcommand.sync_comment_reactions.py: Renamed file and class fromSyncCommentReactionstoSyncCommentFeedback. Updated service toSyncFeedbackService.transform_to_github_comments.py: Added AST parsing for file comments and includedcode_vectorinCommentModel. Adjusted method to accommodate additional parameter.test_transform_to_github_comments.py: Added patching for file content reading in tests. Adjusted test methods to mock file contents.New Files:
filter_comments_service.py: Introduced FilterCommentsService class to filter and select top comments based on confidence and severity metrics.comment_repository.py: Added CommentRepository class with method to find relevant comments based on organization and code vector.sync_feedback_service.py: Implemented SyncFeedbackService class to synchronize GitHub review comments and applied changes with the database.ast_to_string.py: Added functions to read file contents and parse them into abstract syntax trees (AST) based on file language.test_ast_to_string.py: Added tests for parse_file_contents_to_ast function covering various programming languages and edge cases.test_has_applied_change.py: Added tests to verify the detection of applied changes in code hunks with different scenarios.Deleted Files:
sync_reactions_service.py74b9fda...bfe58a3