sargsyan / github-notifier

Get Github and Github Enterprise notifications in your Mac OS  https://githubnotifier.net
MIT License
35 stars 2 forks source link

feature request: filter notifications #24

Open jbergstroem opened 4 years ago

jbergstroem commented 4 years ago

Is your feature request related to a problem? Please describe. I have a pretty busy notification feed and would like the option to choose what notifications are relevant at what time.

With the launch of notification filters, I like the idea of being able to choose one of the filters as a way of what I'd like to get bubbled up to my desktop.

In the same context, I also like the idea of being able to toggle filters. For instance, one for work and one for OSS work. Switching between them would allow you to "go off work" but still stay active in your github community.

Describe the solution you'd like A way of configuring github-notifier to choose a notification filter to use for what notifications to show. Multiple profiles can be stored as well as a quick way to toggle between them.

Describe alternatives you've considered None, really. I don't know any software that achieves the same.

Additional context

sargsyan commented 4 years ago

Hi @jbergstroem,

As I understood, you want to have multiple configs in with the same Github account. One set of projects will go into one config (work-related) and the rest will go to another (OSS). Am I correct?

jbergstroem commented 4 years ago

As I understood, you want to have multiple configs in with the same Github account. One set of projects will go into one config (work-related) and the rest will go to another (OSS). Am I correct?

If you check the left side of your notification center, you can create your own filters. If we can use one of those filters to watch notifications from; I reckon we would be set!

sargsyan commented 4 years ago

Could you please share a screenshot? I cannot find a filter in the notifications screen.

The other alternative could be the option of switching between profiles with github-notifier-configure

jbergstroem commented 4 years ago

Could you please share a screenshot? I cannot find a filter in the notifications screen.

Screen Shot 2020-07-01 at 2 35 17 PM
  1. go to https://github.com/notifications
  2. hit the gears icon (⚙️)
  3. click "create new filter"
sargsyan commented 4 years ago

First things first, the Github notification filter information seems to be not provided by GitHub API. However, I added project filters support, which should handle the feature request. Here's how to do it:

brew upgrade github-notifier && github-notifier-install # updates the app
github-notifier-configure filters add https://github.com work #adds the work filter
github-notifier-configure filters add-project work work-repo/work-project include #adds a project that should be included in notifications.

Note, that if there is at least one project with include filter, the notifications for the other projects will not be shown. There's also exclude filter which excludes the provided project from the allowed notifications. Here is a way how to add such a project:

github-notifier-configure filters add https://github.com work # adds the oss filter
github-notifier-configure filters add-project oss an-oss-repo/nice-to-follow-project exclude # show all notifications apart from the notifications of this project.  

You can enable and enable/disable filters. If you want to go out of working mode or mood you can execute:

github-notifier-configure filters deactivate work

On the next morning ☕

github-notifier-configure filters activate work
jbergstroem commented 4 years ago

Amazing! Will check out a bit later today.