Created
July 8, 2019 10:16
-
-
Save tlkahn/9412bc5875998268ea9ac567e870d9fd to your computer and use it in GitHub Desktop.
delete repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const token = 'some token' | |
let toDelRepos = [ | |
{ full_name: 'tlkahn/c_hashmap', owner: 335719, repo: 96976570 }, | |
{ full_name: 'tlkahn/dashing', owner: 335719, repo: 61136695 }, | |
{ full_name: 'tlkahn/es6-project-starter-kit', | |
owner: 335719, | |
repo: 93257409 }, | |
{ full_name: 'tlkahn/fourmin', owner: 335719, repo: 93795559 }, | |
{ full_name: 'tlkahn/mathematica-tmbundle', | |
owner: 335719, | |
repo: 81361184 }, | |
{ full_name: 'tlkahn/resumebuilder', | |
owner: 335719, | |
repo: 41902296 }, | |
{ full_name: 'tlkahn/rinruby', owner: 335719, repo: 96563329 }, | |
{ full_name: 'tlkahn/robot-sapo', owner: 335719, repo: 85385409 }, | |
{ full_name: 'tlkahn/Sublime-Missing-Palette-Commands', | |
owner: 335719, | |
repo: 108417643 }, | |
{ full_name: 'tlkahn/touched', owner: 335719, repo: 84394364 }, | |
{ full_name: 'tlkahn/vimrc', owner: 335719, repo: 85052205 }, | |
{ full_name: 'tlkahn/website-boilerplate', | |
owner: 335719, | |
repo: 93324793 }, | |
{ full_name: 'tlkahn/ZeroMQ', owner: 335719, repo: 106391900 }, | |
]; | |
toDelRepos.map(r=> { | |
axios.delete(`https://api.github.com/repos/${r.full_name}`, { | |
headers: { | |
Authorization: `token ${token}` | |
} | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment