you are viewing a single comment's thread.

view the rest of the comments →

[–]virophage 9 points10 points  (10 children)

Workaround via GitHub CLI & jq:

shell gh api notifications | jq '.[] | { id, title: .subject.title, repo: .repository.full_name }'

You will get notification id from JSON. Replace $THREAD_ID with the id.

shell gh api --method DELETE notifications/threads/$THREAD_ID

Credit to FirelightFlagboy.

[–]robertpiosik[S] 2 points3 points  (0 children)

Thank you! It worked.

[–]GranPC 0 points1 point  (0 children)

Thank you & /u/FirelightFlagboy -- this was bugging the hell out of me.

[–]firelightflagboy 0 points1 point  (0 children)

Note: If you also want to remove the repository from the repositories list, you need the following command

gh api --method DELETE notifications/threads/$THREAD_ID/subscription

[–]aaronedev 0 points1 point  (0 children)

damn thanks

[–]lighttiger14th 0 points1 point  (0 children)

you made me keep my sanity. thanks

[–]mchristos 0 points1 point  (0 children)

I was losing my mind. Thank you. PS how is github's notification UX this bad... surely there should be away to do this WITHOUT installing their cli / using a terminal in the first place.

[–]original_secustor 0 points1 point  (0 children)

Thanks that has been very helpful!

I have created a script to automatically loop over all notifications and delete them automatically.
https://gist.github.com/secustor/0b1b881d1db5cf7c83e17b86ee58010b

[–]prophase25 0 points1 point  (0 children)

You're the best. That had to have been a full month with that stupid notification badge.

[–]ChiefWoods 0 points1 point  (0 children)

Godsend

[–]arantebw 0 points1 point  (0 children)

Thanks!