github批量删除organization下的private repo

1)先去github生成token
github->settings->Developer settings->Personal access tokens->Generate new token
2)接下来touch 一个repos的文件,将需要删除的仓库写入
example:
org1/test
3)执行命令删除仓库
while read r;do curl -XDELETE -H 'Authorization: token xxxxxxxxxxxxxx' "https://api.github.com/repos/$r ";done < repos
4)登录github,查看audit log,可以看到删除动作,以及最后在organization,检索被删除的仓库,应该就没有了。

原文地址:https://www.cnblogs.com/ccielife/p/12123375.html