Skip to content
Discussion options

You must be logged in to vote

Hi @wasphin,

You can use the GitHub CLI to mark the notifications as read:

gh api notifications\?all=true | jq -r 'map(select(.unread) | .id)[]' | xargs -L1 sh -c 'gh api -X PATCH notifications/threads/$0'

To remove them from the sidebar, I used:

gh api notifications\?all=true | jq -r '.[] | select(.subject.title | test("(paradigm|Lido|gitcoin)"; "i")) | .id' \
| xargs -L1 -I{} gh api \
  --method DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /notifications/threads/{}

If you don’t have the CLI installed, you can add it via Homebrew:

brew install gh

Github CLI Doc
Github API Doc

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wasphin
Comment options

Comment options

You must be logged in to vote
1 reply
@wasphin
Comment options

Answer selected by wasphin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Notifications Keep track of everything happening across all your projects General General topics and discussions that don't fit into other categories, but are related to GitHub
3 participants