Last active
January 22, 2022 05:09
-
-
Save mtliendo/47ab25d79a715744ba0433f6e4779e63 to your computer and use it in GitHub Desktop.
xfer a repo from a personal account to an org
This file contains 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') | |
axios({ | |
url: `https://api.github.com/repos/${username}/${repoName}/transfer`, | |
method: 'POST', | |
data: { | |
new_owner: `${orgName}`, | |
}, | |
headers: { | |
Accept: 'application/vnd.github.v3+json', | |
Authorization: `token ${YOUR_GITHUB_TOKEN}`, | |
}, | |
}) | |
.then(({ data }) => console.log(data)) | |
.catch((e) => console.log(e)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment