-
Notifications
You must be signed in to change notification settings - Fork 315
Refactor tools into modular code review and core packages #5344
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
Conversation
This commit introduces a modular structure for bugbug tools, separating code review, comment resolution, and core utilities into distinct subpackages.
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 bugbug tools codebase into a modular structure, organizing code review and comment resolution tools into distinct subpackages with shared core utilities.
- Introduces a new modular package structure (
core/
,code_review/
,comment_resolution/
) - Separates platform-specific implementations (Phabricator, Swarm, Bugzilla) into dedicated modules
- Maintains backward compatibility through re-exports in
__init__.py
files
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
bugbug/tools/core/utils/formatting.py | New module containing diff processing and formatting utilities previously in code_review.py |
bugbug/tools/core/platforms/swarm.py | Extracted Swarm platform implementation |
bugbug/tools/core/platforms/phabricator.py | Extracted Phabricator platform implementation with duplicate code |
bugbug/tools/core/platforms/bugzilla.py | Extracted Bugzilla integration with duplicate code |
bugbug/tools/core/platforms/base.py | Base classes for platform implementations |
bugbug/tools/core/data_types.py | Core data type definitions |
bugbug/tools/core/exceptions.py | Custom exception definitions |
bugbug/tools/comment_resolver.py | Updated with deprecation warning |
bugbug/tools/comment_resolution/agent.py | Extracted comment resolution agent |
bugbug/tools/code_review/prompts.py | Extracted prompt templates |
bugbug/tools/code_review/langchain_tools.py | LangGraph tools for code review |
bugbug/tools/code_review/database.py | Vector database implementations |
bugbug/tools/code_review/agent.py | Main code review agent |
bugbug/tools/code_review/init.py | Backward-compatible exports for code review |
bugbug/tools/code_review.py | Removed monolithic file (now modular) |
bugbug/tools/init.py | Top-level backward-compatible exports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
We might want to have some in the top directory, shared across because they are useful outside code review, and some under code review. |
This PR introduces a modular structure for bugbug tools, separating code review, comment resolution, and core utilities into distinct subpackages.