Before people jump in, posting about how the "new" *cough* Microsoft isn't that bad... firstly this isn't about Microsoft per se. It was a problem letting the infrastructure we depend on, be based on the business plans and proprietary tools of one company, long before Microsoft bought GitHub.
This is one area where we have more than enough skills and talent to do better. Options exist. GitLab, Gitea, GitLite, GOGS and more. Support them! Contribute! Help make them and the world, better.