I've been looking for a way to convert my private repositories to public ones, but since there are so many of them, I preferred to do it the easy way and resorted to the GitHub API, but this one, as far as I could find, only allows editing the visibility of repositories that are public. Looking through the most up-to-date documentation, I realized that the only endpoints available for access while authenticated are (Repositories, Endpoints available):
GET /user/reposPOST /user/reposPOST /user/projects
I also tried using the browser console and generating a log when I make a request to change visibility, but it doesn't seem to make any requests to the GitHub API.