ccbunney
ccbunney

Reputation: 2752

GitHub notifications showing "unread"

For a while now my GitHub notifications page has been showing "1 unread" notification, even though all my notifications are "read". Nothing is listed when clicking the "unread" tab (or the "all" tab for that matter).

How can I clear this? It's quite annoying!

Unread?

Upvotes: 16

Views: 688

Answers (2)

PathToLife
PathToLife

Reputation: 1183

If you can't use the UI, you can use the API instead from Github.com docs.

https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#mark-notifications-as-read

# GitHub CLI api
# https://cli.github.com/manual/gh_api

gh api \
  --method PUT \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /notifications \
   -f "last_read_at=2022-06-10T00:00:00Z" -F "read=true"

For me I used the github cli (gh auth login first) as i didn't have to deal with tokens manually.

Upvotes: 2

ccbunney
ccbunney

Reputation: 2752

So - I found a way to clear this (with a bit of help from this thread: https://github.com/community/community/discussions/6874)

Here's the process I used:

  • Goto the Done tab
  • Click select all then click move to inbox
  • Goto the Inbox
  • Click select all then mark as unread
  • Click the link that says select all xxx messages
  • Click Done

Hopefully this should clear the ghost "unread" message!

Upvotes: 26

Related Questions