A Python script for bulk migrating repos from one org to other org GitHub repositories using the API
Project description
Github Enterprise cloud migration tool
This tool helps you do the below tasks
Github Migration
Migrates provided github repos from source org to target organization
Generate Github Personal Access Token
- Follow the steps here to generate personal access token. Copy the token.
- For github enterprise cloud, the token should be enabled with SAML SSO
- Follow the steps here
Running the tool
- Install python3
brew install python3
- Store the token in an variable
export token=<github personal access token>
Run the below command to install the github migration tool
pip3 install ghec-migration
Invoke the tool by running ghec-migration
Output of the tool
➜ ~ ghec-migration
Github Migration
? What do you want to do? Github Migration
? Source github org nike-platform-fulfillment
? Target github org nike-internal
? Target Team Slug fulfillment-squad-artemis
? Team Prefix fulfillment
? Github Username test@nike.com
? Github access token $token
? How do you want to get the repos? Search by Topic
? Topic Name artemis
Jenkins Migration
We can change the github url in the bmx job using this tool
Generate a jenkins following the steps here
Github Migration
? What do you want to do? Jenkins BMX Migration
? Update Jenkins Job with new repo Yes
? BMX Jenkins URL https://mpartemis.jenkins.bmx.nikecloud.com/
? Jenkins Token <jenkins token>
? Jenkins Username <nike email id>
? New Github Url https://github.com/nike-internal
? old Github Url https://github.nike.com/mp-commerce-fulfillment
? Team Prefix fulfillment
? Check the job artemis-wafflecone-cf-poc in jenkins. Is it ok to proceed? (Use arrow keys)
❯ yes
no
don't ask me again!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ghec_migration-1.0.2.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for ghec_migration-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc68bdf9449198ecc038ce90a25b80e8a8f97fcfcb1d8da44cf114cee4f9478 |
|
MD5 | 7ab83c3a36782545ab8a2e79368622dc |
|
BLAKE2b-256 | 5998f6b11cf06a97f83d9ff1e42bfd74e9ce520b3c987e218e02a50c0e64216a |