A tool to migrate organization
- Create .env file:
touch .env
nano .env
GITHUB_ACCESS_TOKEN=
GITFLIC_ACCESS_TOKEN=
SOURCE_ORGANIZATION=deep-foundation
TARGET_ORGANIZATION=link-foundation
- Download data from source organization
node js/download.js
- Upload data to target organization
node js/upload.js
node ./js/push-repositories.js 2>&1 | tee push-repositories.log.txt
node ./js/push-repositories.js > >(tee -a push-repositories.stdout.log.txt) 2> >(tee -a push-repositories.stderr.log.txt >&2)
node ./js/push-repositories-to-gitflic.js 2>&1 | tee push-repositories-to-gitflic.log.txt
node ./js/push-repositories-to-gitflic.js > >(tee -a push-repositories-to-gitflic.stdout.log.txt) 2> >(tee -a push-repositories-to-gitflic.stderr.log.txt >&2)
node ./js/push-issues.js 2>&1 | tee push-issues.log.txt
node ./js/push-issues.js > >(tee -a push-issues.stdout.log.txt) 2> >(tee -a push-issues.stderr.log.txt >&2)
node ./js/push-code-commits.js 2>&1 | tee push-code-commits.log.txt
node ./js/push-code-commits.js > >(tee -a push-code-commits.stdout.log.txt) 2> >(tee -a push-code-commits.stderr.log.txt >&2)
node ./js/push-code-commits-to-gitflic.js 2>&1 | tee push-code-commits-to-gitflic.log.txt
node ./js/push-code-commits-to-gitflic.js > >(tee -a push-code-commits-to-gitflic.stdout.log.txt) 2> >(tee -a push-code-commits-to-gitflic.stderr.log.txt >&2)
pip3 install PyGithub python-dotenv