Skip to content

Instantly share code, notes, and snippets.

@christoph-jerolimov
Created November 5, 2025 12:40
Show Gist options
  • Select an option

  • Save christoph-jerolimov/0f13d8ad0a9ce6ba0dac4d22871920a5 to your computer and use it in GitHub Desktop.

Select an option

Save christoph-jerolimov/0f13d8ad0a9ce6ba0dac4d22871920a5 to your computer and use it in GitHub Desktop.
Delete some spam GitHub notifications
#!/bin/bash
set -e
for i in {1..22}; do
echo $i
gh api "notifications?all=true&page=$i" | jq -r '.[] | select(.repository.full_name == "gitcoinco-n/gitcoin")'
gh api "notifications?all=true&page=$i" | jq -r '.[] | select(.repository.full_name == "gitcoinco-n/gitcoin") | .id' | \
xargs -I {} gh api -X DELETE 'notifications/threads/{}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment