-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
allow to filter entries by title per subscription #57
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sebastian Hoß <[email protected]>
Signed-off-by: Sebastian Hoß <[email protected]>
@tulir sorry missed that there were lint errors - I hope that those are fixed now.. |
Signed-off-by: Sebastian Hoß <[email protected]>
Ok sorry again @tulir - third time's a charm? This time I installed all the tools and basically run the entire lint pipeline locally:
All checks are passing locally - sorry again for the inconvenience.. |
if title_exclude_filter: | ||
self.log.debug( | ||
f"Feed '{feed.id}' ({feed.title}) has exclude filter '{title_exclude_filter}'" | ||
) | ||
if re.search(title_exclude_filter, entry.title): | ||
self.log.info(f"Excluded '{entry.title}'") | ||
return None | ||
else: | ||
self.log.debug(f"Not excluding '{entry.title}'") | ||
else: | ||
self.log.debug(f"Feed '{feed.id}' ({feed.title}) has no exclude filter") |
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.
These logs should be .trace()
instead of debug or removed entirely
) | ||
@command.argument("feed_id", "feed ID", parser=int) | ||
@command.argument("title_exclude_filter", "title exclude filter", pass_raw=True) | ||
async def set_filter(self, evt: MessageEvent, feed_id: int, title_exclude_filter: str) -> None: |
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.
This should validate the filter before saving it (probably just re.compile
)
@@ -18,7 +18,7 @@ | |||
upgrade_table = UpgradeTable() | |||
|
|||
|
|||
@upgrade_table.register(description="Latest revision", upgrades_to=3) | |||
@upgrade_table.register(description="Latest revision", upgrades_to=4) |
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.
You forgot to update the CREATE TABLE
statement with the new column
fixes #6