This script will delete all the subscriptions in your account for the Github Organization passed to it.
This script was created when I took a new job, and my notification settings inadvertantly subscribed me to all 600+ of their repos. I wanted a better signal to noise ratio in my notifications, but I didn't want to click the "Unwatch All" button, which would remove my subscriptions to repos outside my new employer's org.
- Create a Personal Access Token with the "repo" scope, and expose it as the
GITHUB_PERSONAL_ACCESS_TOKEN
environment variable:
$ export GITHUB_PERSONAL_ACCESS_TOKEN=<your-token-here>
- Copy both files into a directory and install the requirements:
$ pip install -r requirements.txt
- Run the
unsubscribe.py
script, and pass in the Github Organization that contains the repos you want to unsubscribe from:
$ python unsubscribe.py <whatever-github-org>
You will be prompted for "(y/n)" before any subscriptions are deleted.
Great script, worked like a charm, but: