abiczo / github-notifier

Github updates notifier for Linux
57 stars 8 forks source link

Feature: Blacklist authors/projects #9

Closed kevinjalbert closed 12 years ago

kevinjalbert commented 12 years ago

This feature gives the user the ability to toggle a filter to ignore oneself (and I guess in a way to ignore selective people). There has been times where I am producing a lot of activity on GitHub and I keep getting a constant stream of notifications all related to myself. This will allow one to ignore items in which they are the author.

EDIT: Feature is now geared to having a blacklist of authors and projects that should be ignored.

abiczo commented 12 years ago

Sorry about the delay. This looks good but can you maybe call this something like exclude or similar instead of oneself? Or even better would be in my opinion if you could do exclude_projects and exclude_authors in the same format as when including projects authors. Probably even the configuration reading code could be shared.

Also, I'm starting to feel that we could simplify the whole filtering code by just having either an include or exclude regexp that would filter on /. This way you'd have the same functionality as now but the configuration and filtering code could be much simplified. What do you think? (e.g. include_regexp=^kevinjalbert/|^abiczo/github-notifier or exclude_regexp=/someproject$|^abiczo/someotherproject$)

kevinjalbert commented 12 years ago

I agree the naming of this is kinda bad. I just named it because I wanted to ignore my own notifications, but I agree that using excludes would probably work better.

I will take a stab at reworking it adjust the ignore oneself into _excludeauthors and _excludeprojects. I have some project to work on so I will aim to have this done sometime in the next few weeks when I have the spare time. It will most likely operate the same as the includes. As for the regrex idea I think it could simplify the code, but the refactoring can come later unless you (or someone else) wants to try it.

I think eventually it would be nice to have the ability to dynamically adjust the contents of the config.cfg file from the actual application. I know you can do this by simply editing the file with a text editor, but a nice GUI where you can just write in a textbox could be a neat idea.

abiczo commented 12 years ago

Yeah, I think the exclude_* would be cool for now, the regexp idea can be explored later. Thanks!

abiczo commented 12 years ago

Also agreed that editing these settings dynamically would be nice. The regexp thing might make that a bit easier too as you'd only need a single textbox and an include/exclude setting (radio button or checkbox etc.)

kevinjalbert commented 12 years ago

I have made the changes like we discussed (blacklisting authors and projects in a similar way to the inclusion of them). I also refactored some of the code.

abiczo commented 12 years ago

Cool, thanks!