It lets you to unsubscribe unread notifications by regex.
You need to create .ghnf
folder under your home directory before use.
Then, you need to create and fill the content of the following files under ~/.ghnf
:
filters
: regex listtoken
: your GitHub personal access tokenignore
: (optional) thread list to exclude from the match
Write any regex you want to match with.
Suppose you want to unsubscribe all notifications start with bad
or poor
, the content of ~/.ghnf/filters
will be the following:
^bad
^poor
(all lines are considered as case-insensitive regex)
Create a personal access token, then copy and paste the token to ~/.ghnf/token
Each subscription (issues, pull requests, commits) have unique ID, called thread ID.
If you want to exclude a subscription from unsubscription, write its thread ID in ~/.ghnf/ignore
.
1234567
2345678
$ ghnf remove # unsubscribe all notification matched
$ ghnf remove -c # show you the matched notifications, ask if you want to unsubscribe all
$ ghnf list # show all unread notifications
$ ghnf open <thread_id> # open the thread with your browser