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
Implemented general filtering (replaces blame filtering) #28
Merged
Conversation
This file contains 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
Looks great, thanks for this! A few comments to discuss/resolve |
I think we should do something to help ease the transition for users, e.g. write a page about migrating from blame-filter to filter, check the --blame-filter argument and point people to the page. But that might be better as a separate PR to keep this one small. |
balgillo
requested changes
Sep 28, 2023
abyss638
force-pushed
the
abyss638/general-filtering
branch
from
October 4, 2023 00:10
221f528
to
7275be9
Compare
balgillo
approved these changes
Oct 4, 2023
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.
BREAKING CHANGE
Fixes #13
Implemented general filtering for any field in a results object. This replaces blame filtering which filtered only by author emails in blame details.
The filter format is switched from plain text to YAML.
Here is an example of a filter file (from updated README.md):
Field names must be specified as a JSONPath expression, substrings and Regex are supported as before.
The following shortcuts are supported (from updated README.md):
For
location
which represents a file location wildcards are supported:?
- a single occurrence of any character in a directory or file name*
- zero or more occurrences of any character in a directory or file name**
- zero or more occurrences across multiple directory levelsAdded a Pytest UTs for filtering code.
FilterStats
is extracted to a standalone file and simplified (removed few no longer needed counters).'GeneralFilter' is based on an extracted
BlameFilter
.