Skip to content

Instantly share code, notes, and snippets.

View derrickburns's full-sized avatar

Derrick Burns derrickburns

View GitHub Profile
@derrickburns
derrickburns / unwatch.sh
Created March 26, 2022 17:03 — forked from madchap/unwatch.sh
Unwatch all github repos from organization (unsubscribe)
# get api token with proper perms, ensure full "repos" for private repo access.
$ export auth="Authorization: token 123345465hfghfghfghgfhgfhfg"
$ export org="your_org"
# get the last page in the Link header. github API limits per_page to 100. Anything over this will require pagination.
$ curl -I -H "$auth" https://api.github.com/orgs/$org/repos
# go over all pages. Put this in a script, and save it.
#!/bin/bash