Change Visibility of GitHub Repo from Azure Functions

Azure Function App for changing the Visibility of a GitHub Repository from Public-Private or vice versa. Have anyone got this worked before? Can you share? Thanks