How to unsubscribe from all the pesky GitHub emails when added to a new organization

On the first day of my internship at BuzzFeed last summer I was added to their GitHub organization. Along with read access to several repos, I was also automatically subscribed to watch each repo.

In the first few hours I received hundreds of email notifications for PRs, comments, issues, and more. When I got home to find all these emails a quick Google Search showed that going to https://github.com/watching would allow you to see all the repos you were watching and unwatch them.

Many of my colleagues clicked the handy “Unwatch all” button on the top of the page. That wouldn’t work for me since I was watching several repos that I wanted the notifications from.

As such, I whipped up this handy little script to unwatch all the repos containing the organization name. All you have to do is paste it in the browser console and watch it do it’s magic! Fast forward to today, as I start working at the New York Times, and I found this script to be handy again. As such, I decided share it on here!

animated GIF of watched GitHub repositories being unwatched.

PS: This blog post was originally published on Medium, back before all the paywalls. It was moved here April 2024.