AI21Labs/github-migration
JavaScript
Captured source
source ↗published Dec 20, 2022seen 5dcaptured 15hhttp 200method plain
AI21Labs/github-migration
Language: JavaScript
Stars: 1
Forks: 1
Open issues: 2
Created: 2022-12-20T10:55:34Z
Pushed: 2025-02-15T00:08:31Z
Default branch: master
Fork: no
Archived: no
README:
Github Migration
Migrate Bitbucket repositories to Github
Prerequisites
- Install nvm
brew install nvm
- Configure Node Version Manager (nvm) as described here
- Configure SSH key in GitHub by clonning dev-envs and running
Getting Started
Install deps
source ./init.sh
Github Mobile
- Download GitHub app for mobile
Create Access Tokens
- Create Github Personal Access Token (PAT) with the scopes specified
- Create Bitbucket Access Token
- Update the following in [.env-template](./.env-template) file:
- GitHub username
- GitHub and BitBucket tokens
- Repository to migrate
Migrate a Bitbucket Repository
- Run migration script
$ node migration.js --help Usage: migration.js --ght [string] --bbt [string] --repo [string] --owner [string] Options: --help Show help [boolean] --version Show version number [boolean] --ght Github Personal Access Token (PAT) [require] --bbt BitBucket Personal Access Token (PAT) [required] --repo Repository to migrate [required] --owner Github username [required]
- For example:
node migration.js --bbt BB_TOKEN --ght GH_TOKEN --owner USER --repo REPO_NAME
- Update Cloudbuild with the new github repository
- connect repository
- replace
cloudBuild.ymltrigger - Verify CI/CD for your module works
- Delete your repository from bitbucket once it becomes obsolete
Contribute
- Run validation by leveraging pre-commit as described here
- Install
pre-commit install --install-hooks -t pre-commit -t commit-msg - To run on-demand
pre-commit run -a - Submit a pull-request