How to Bulk Transfer Github Issues from Repository A to Repository B
Here’s a simple command you can run in your terminal to transfer all the issues from one Github repository to another!
Here’s a simple command you can run in your terminal to transfer all the issues from one Github repository to another!
Pre-requisites:
- Make sure you have Github CLI installed: 
# MAC
brew install gh2. Make sure you are “authenticated” through Github CLI:
# start interactive setup
gh auth login3. Make sure that the repository you’re transferring from & to have the same labels, fields, etc.
NOTE: I didn't actually test step #3 above... maybe it's not a problem.
Just test it first if you're worried and LMK in the comments if it matters!Now you’re ready to run to bulk transfer your issues!
- Open your terminal & run the command below 
Just make sure to replace the `organization/repository` name syntax with the ones that you want.
In my example, those are:
- devinschumacher/repository-a 
- devinschumacher/repository-b -R devinschumacher/repository-a 
gh issue list -s all -L 500 --json number -R devinschumacher/repository-a | \
    jq -r '.[] | .number' | \
    while read issue; do
        gh issue transfer "$issue" devinschumacher/repository-b -R devinschumacher/repository-a
        sleep 2
    doneThat’s it!


