Last active
October 3, 2024 11:45
-
-
Save Pagliacii/0fb58e077f73cc13212a9faa04c43ebd to your computer and use it in GitHub Desktop.
Revisions
-
Pagliacii revised this gist
Oct 3, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Sometimes you may see a blue dot on your GitHub avatar, but can't find what unre This is a trivial UI bug. You can see these **"invisible"** notifications in the terminal by using [gh](https://cli.github.com/). [Ref](https://github.com/orgs/community/discussions/6874). ## Show me After you've authorized your account, you could see the unread notifications by running: -
Pagliacii revised this gist
Aug 6, 2024 . 1 changed file with 94 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,97 @@ Then, you can update the `last_read_at` field to mark notifications as read: gh api notifications -H "Accept: application/vnd.github.v3+json" -X PUT -f last_read_at=2024-08-07T00:00:00Z ``` And voila, the blue dot should disappear! ## Details One such example is notifications from removed repositories. Here's a sample output showing an "invisible" notification: ```json [ { "id": "11206978932", "unread": true, "reason": "subscribed", "updated_at": "2024-06-23T03:29:59Z", "last_read_at": null, "subject": { "title": "Invitation to join overzealousquant/Quant-Leaks-Interview from overzealousquant", "url": null, "latest_comment_url": null, "type": "RepositoryInvitation" }, "repository": { "id": 817075042, "node_id": "R_kgDOMLOTYg", "name": "Quant-Leaks-Interview", "full_name": "overzealousquant/Quant-Leaks-Interview", "private": true, "owner": { "login": "overzealousquant", "id": 170038529, "node_id": "U_kgDOCiKVAQ", "avatar_url": "https://avatars.githubusercontent.com/u/170038529?v=4", "gravatar_id": "", "url": "https://api.github.com/users/overzealousquant", "html_url": "https://github.com/overzealousquant", "followers_url": "https://api.github.com/users/overzealousquant/followers", "following_url": "https://api.github.com/users/overzealousquant/following{/other_user}", "gists_url": "https://api.github.com/users/overzealousquant/gists{/gist_id}", "starred_url": "https://api.github.com/users/overzealousquant/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/overzealousquant/subscriptions", "organizations_url": "https://api.github.com/users/overzealousquant/orgs", "repos_url": "https://api.github.com/users/overzealousquant/repos", "events_url": "https://api.github.com/users/overzealousquant/events{/privacy}", "received_events_url": "https://api.github.com/users/overzealousquant/received_events", "type": "User", "site_admin": false }, "html_url": "https://github.com/overzealousquant/Quant-Leaks-Interview", "description": null, "fork": false, "url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview", "forks_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/forks", "keys_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/keys{/key_id}", "collaborators_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/collaborators{/collaborator}", "teams_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/teams", "hooks_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/hooks", "issue_events_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/issues/events{/number}", "events_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/events", "assignees_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/assignees{/user}", "branches_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/branches{/branch}", "tags_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/tags", "blobs_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/git/blobs{/sha}", "git_tags_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/git/tags{/sha}", "git_refs_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/git/refs{/sha}", "trees_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/git/trees{/sha}", "statuses_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/statuses/{sha}", "languages_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/languages", "stargazers_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/stargazers", "contributors_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/contributors", "subscribers_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/subscribers", "subscription_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/subscription", "commits_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/commits{/sha}", "git_commits_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/git/commits{/sha}", "comments_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/comments{/number}", "issue_comment_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/issues/comments{/number}", "contents_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/contents/{+path}", "compare_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/compare/{base}...{head}", "merges_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/merges", "archive_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/{archive_format}{/ref}", "downloads_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/downloads", "issues_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/issues{/number}", "pulls_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/pulls{/number}", "milestones_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/milestones{/number}", "notifications_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/notifications{?since,all,participating}", "labels_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/labels{/name}", "releases_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/releases{/id}", "deployments_url": "https://api.github.com/repos/overzealousquant/Quant-Leaks-Interview/deployments" }, "url": "https://api.github.com/notifications/threads/11206978932", "subscription_url": "https://api.github.com/notifications/threads/11206978932/subscription" } ] ``` -
Pagliacii created this gist
Aug 6, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # Where are unread notifications? Sometimes you may see a blue dot on your GitHub avatar, but can't find what unread notification it's referring to. This is a trivial UI bug. You can see these **"invisible"** notifications in the terminal by using [gh](https://cli.github.com/). ## Show me After you've authorized your account, you could see the unread notifications by running: ``` gh api notifications -H "Accept: application/vnd.github.v3+json" ``` Then, you can update the `last_read_at` field to mark notifications as read: ``` gh api notifications -H "Accept: application/vnd.github.v3+json" -X PUT -f last_read_at=2024-08-07T00:00:00Z ``` And voila, the blue dot should disappear!