Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move many repos to a new github organization

I have an organization with many repos (300 +) and I expect this number to grow. Therefore, from time to time, I want to clean up my organization but I would like to avoid deleting the repositories.

So right now my idea of cleaning up would be, to transfer repos that are depricated to a different organization, where I can still keep them and transfer them back, if needed, but the number of repos in the original organization goes down to ~50 or so.

I am aware of the possibility to transfer ownership within github, however repeating the process 250 times seems like a nightmare to me and I would like to automate this (there is no API endpoint to do so afaik).

Does anyone have an idea how to solve this or ever encountered a similar task?

Thanks for your help!

(In terms of automation any solution that includes python or nodejs would be preferred over other languages)

like image 398
Sebastian Meyer Avatar asked Oct 19 '25 03:10

Sebastian Meyer


1 Answers

This github-api-bulk-transfer seems to solve exactly that problem. It also notes that: An UNSUPPORTED AND UNSTABLE PREVIEW feature for repository transfer has recently been introduced to the GitHub API that allows this process to be automated so I would proceed with caution.

like image 135
Alex Avatar answered Oct 20 '25 15:10

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!