The curl command below will mark all of your notifications as read, clear the notification indicator, and should take care of that phantom message for you.
A few things to note:
In order to use this command a Personal Access Token (PAT) will be required and $TOKEN needs to be replaced by a personal access token you can create here: https://github.com/settings/tokens/new. Creating a Personal Access Token also has the steps to create a token. After it is created, replace $TOKEN in the command with your new PAT.
Note: Please ensure that the PAT has the notifications
scope.
Please update the date and time to your current date and note the time values must be in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl -H "Authorization: bearer $TOKEN" -X PUT -H "Accept: application/vnd.github.v3+json" https://api.github.com/notifications -d '{"last_read_at":"2022-11-08T13:21:00"}'
You can also export the current date and time in bash by running:
export now=$(date +%Y-%m-%dT%H:%M:%SZ)
Then you can use the date and time variable in the curl command as follows:
curl -H "Authorization: bearer $TOKEN" -X PUT -H "Accept: application/vnd.github.v3+json" https://api.github.com/notifications -d '{"last_read_at":"'"$now"'"}'
For your reference, here is the documentation for the Notifications REST API endpoint.