惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - 阿牛

在家无缝访问公司内网:我的低成本、高安全远程办公方案 好学生 Deepseek 的学习过程 DeepSeek R1 的推理过程与人类团队处理任务的类比 ColorOS14升级15保持ROOT windows11获取不到IPv6的解决方法 wps插件工具 当github双因子认证遇到鸿蒙手机 从Console中获取VUE的Route参数 雨霖工具 使用Powershell脚本实现微信多开 调试远程GithubAction 突破Vecel网站最大运行10秒的限制 备份51CTO买到的视频课程 白嫖Gitee收费服务, 实现瞬时Pages更新 PC微信小程序解密和反编译资源 批量删除gitlab仓库 批量删除github仓库 树莓派系统充分利用SD卡空间 Thinkpad T470p Clover and opencore 吃黑苹果 Catalina 10.15.5
批量删除gitee的代码库
阿牛 · 2021-08-22 · via 博客园 - 阿牛

先获取令牌,然后再console中执行。

(async function() {
    let resp = await fetch("https://gitee.com/api/v5/users/yourname/repos?access_token=#your_token_string#&type=all&sort=full_name&direction=asc&page=1&per_page=100", {
        "headers": {
            "accept": "application/json, text/plain, */*",
            "content-type": "application/json;charset=utf-8"
        },
        "referrer": "https://gitee.com/api/v5/swagger",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": null,
        "method": "GET",
        "mode": "cors",
        "credentials": "include"
    });

    let list = await resp.json();
    let fetchurls = list.filter((v,i)=>v.full_name.indexOf('/cto-') > 0).map((v,i)=>'https://gitee.com/api/v5/repos/' + v.full_name + '?access_token=#your_token_string#');
    for (var i = 0, c = fetchurls.length; i < c; i++) {
        let url = fetchurls[i];
        await fetch(url, {
            method: 'DELETE',
            headers: {
                "Content-Type": "application/json;charset=UTF-8"
            }
        })
    }
    console.log('ok')
}
)();