-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add filter-by-user functionality #65
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
Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
Filter by teams Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
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 introduces functionality to filter queries by user alongside existing team filters while refactoring how filters are applied. Key changes include creating a new QueryFilter class to encapsulate filter logic, updating the Version2Query class to use these filters (and removing the explicit teams parameter), and modifying the CLI configuration to support the new user filter.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
version2.py | Added a filters dictionary and updated the process call to use filters. |
src/version2query.py | Integrated QueryFilter, added filter_items_by_user, and streamlined process. |
src/version2config.py | Removed nargs for include-user to align with the new CLI approach. |
src/queryFilter.py | Introduced the new QueryFilter class to manage various filter criteria. |
current-implemented-CLI.md | Updated CLI documentation to reflect the new include-user parameter. |
Comments suppressed due to low confidence (1)
src/queryFilter.py:115
- [nitpick] For consistency, consider renaming 'exclude_label' to 'exclude_labels' to match the plural naming pattern used for similar properties.
def exclude_label(self) -> list[str]:
print("[red]Processing failed.[/red]") | ||
return | ||
raise RunTimeError("Processing failed.") |
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.
Consider handling processing failures gracefully (for example, by exiting with an error code) rather than raising a RunTimeError, to maintain conventional CLI behavior.
raise RunTimeError("Processing failed.") | |
sys.exit(1) |
Copilot uses AI. Check for mistakes.
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.
I want to raise here instead of exit.
Adds new class: QueryFilter
Adds new functionality: Filter by user
Updates cli to remove nargs
Sets filters in version2query object
Defines filter mechanism in main