block by tmcw 0faf0b6b12813d50ab0324c87b47813d

Managing GitHub Watching en masse

Managing GitHub Watching

I decided to unwatch many repos in multiple organizations. Here are two scripts that I wrote to make that possible. It works like:

  1. I load GitHubAccessToken in my environment, an environment variable that gives these access
  2. I run node get-all-watched.js > all-watching.txt to dump all watching into a text file
  3. Run grep "^developmentseed" all-watching > developmentseed.txt, for instance, to make a text file of only repos in the developmentseed org that I’m watching
  4. Run node unwatch-file-of-repos.js developmentseed.txt to unwatch all those repos.

get-all-watched.js

package.json

unwatch-file-of-repos.js