-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(releases): Support filtering by release.created
#104877
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
Allows filtering on release date added which we display as created.
release.created to release queryrelease.created
| **{ | ||
| f"date_added__{OPERATOR_TO_DJANGO[search_filter.operator]}": search_filter.value.raw_value | ||
| } | ||
| ) |
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.
Bug: Missing negation handling causes KeyError with != operator
The RELEASE_CREATED_KEY filter directly accesses OPERATOR_TO_DJANGO[search_filter.operator], but OPERATOR_TO_DJANGO does not include the != operator. When a user queries with release.created:!=<date>, this will raise a KeyError. The adjacent SEMVER_BUILD_ALIAS filter correctly handles this by calling handle_operator_negation() first to convert != to = and extract a negated flag, then using exclude() when negated.
| **{ | ||
| f"date_added__{OPERATOR_TO_DJANGO[search_filter.operator]}": search_filter.value.raw_value | ||
| } | ||
| ) |
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.
Bug: Missing negation handling causes KeyError with != operator
The RELEASE_CREATED_KEY filter directly accesses OPERATOR_TO_DJANGO[search_filter.operator], but OPERATOR_TO_DJANGO does not include the != operator. When a user queries with release.created:!=<date>, this will raise a KeyError. The adjacent SEMVER_BUILD_ALIAS filter correctly handles this by calling handle_operator_negation() first to convert != to = and extract a negated flag, then using exclude() when negated.
malwilley
left a comment
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.
Seems useful!
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Allows filtering on release date added which we display as created. example `release.created:-7d` Motivation: the date filter doesn't really work this way on releases, this could be interesting?
Allows filtering on release date added which we display as created.
example
release.created:-7dMotivation: the date filter doesn't really work this way on releases, this could be interesting?