Fix for notifications from github users/repos that don't exist.

If you’re being mentioned on Github via a spam account in a repository where neither no longer exist (example below) -

2025/10/image.png
2025/10/image-1.png

You can clear it if you have the gh CLI installed by running:

gh api notifications

which will print something like this

[
  {
    "id": "19145592582",
    "unread": true,
    "reason": "mention",
    "updated_at": "2025-09-24T00:44:23Z",
    "last_read_at": null,
    "subject": {
      "title": "Y-Combinator W2026 | $15M Y-Combinator & GitHub",
      "url": "https://api.github.com/repos/ycombinaattor/-co/issues/376",
      "latest_comment_url": "https://api.github.com/repos/ycombinaattor/-co/issues/376",
      "type": "Issue"
    },
    "repository": {
      "id": 1062943814,
      "node_id": "R_kgDOP1s8Rg",
      "name": "-co",
      "full_name": "ycombinaattor/-co",
      "private": false,
      "owner": {
        "login": "ycombinaattor",
        "id": 233633674,
        "node_id": "U_kgDODez3ig",
        "avatar_url": "https://avatars.githubusercontent.com/u/233633674?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ycombinaattor",
        "html_url": "https://github.com/ycombinaattor",
        "followers_url": "https://api.github.com/users/ycombinaattor/followers",
        "following_url": "https://api.github.com/users/ycombinaattor/following{/other_user}",
        "gists_url": "https://api.github.com/users/ycombinaattor/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/ycombinaattor/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/ycombinaattor/subscriptions",
        "organizations_url": "https://api.github.com/users/ycombinaattor/orgs",
        "repos_url": "https://api.github.com/users/ycombinaattor/repos",
        "events_url": "https://api.github.com/users/ycombinaattor/events{/privacy}",
        "received_events_url": "https://api.github.com/users/ycombinaattor/received_events",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },

and using the id with gh api -X DELETE notifications/threads/NOTIFICATION_ID_HERE

So in my case I ran: gh api -X DELETE notifications/threads/19145592582 and it was deleted.

Fucking lazy ass spammers.