标签:github content power 权限 user toc let ati 运行
正常情况下,如果需要删除GitHub上不需要的repos,手动删除的操作有点繁琐。如果只要删除一个还能接受,手动删除多个repos就有点浪费时间了。其实我们可以通过GitHub的API接口来批量删除不需要的repos。
while read r;do curl -XDELETE -H ‘Authorization: token xxx‘ "https://api.github.com/repos/$r ";done < repos
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
get-content D:\repolist.txt | ForEach-Object { Invoke-WebRequest -Uri https://api.github.com/repos/$_ -Method “DELETE” -Headers @{"Authorization"="token xxx"} }
标签:github content power 权限 user toc let ati 运行
原文地址:https://www.cnblogs.com/yifeichongtian/p/12716767.html