Click to watch the video 👆
Here’s a simple command you can run in your terminal to transfer all the issues from one Github repository to another!
- Make sure you have Github CLI installed:
$ brew install gh
- (Mac)
- Make sure you are “authenticated” through Github CLI:
$ gh auth login
- 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 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
done
That’s it!
![Bulk Transfer Github Issues to Another Repository](https://private-user-images.githubusercontent.com/45643901/289780778-4bd8c681-9ab0-4ec3-a73e-44f85f725116.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjU5NTQsIm5iZiI6MTcyMTc2NTY1NCwicGF0aCI6Ii80NTY0MzkwMS8yODk3ODA3NzgtNGJkOGM2ODEtOWFiMC00ZWMzLWE3M2UtNDRmODVmNzI1MTE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDIwMTQxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdhNGRjODQ3YTFhZmUxYTkxYjEzMmNlYTYwOTYzMWQ1NTA1YTUzZGZjYWQ2NjMyMWI4ZDMyYjgxMmJkNjQzNjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a1e7n1pvjRyoCH_BzfEnttqsOU8917tk82QFNJ7OiPs)
Subscribe for more awesome stuff! - https://serp.ly/@devin/email