Thanks for being here! I’m sharing the solution you’ve received from Support here as it might help others.
There are a few ways that you can do this. I’d recommend from the terminal, and using v3 of our API (REST) you can make a GET request to fetch these specifically (as documented here: https://developer.github.com/v3/repos/branches/#list-branches)
Or if this is a private repository that you have access to then you’ll need to make an authenticated request using either an OAuth / Personal Access Token or using basic authentications (username / password) (as documented here:https://developer.github.com/v3/#authentication):
curl -H "Authorization: token $TOKEN" https://api.github.com/repos/joomla/joomla-cms/branches
In the above request you’d substitute the placeholder $TOKEN with your access token.
If you’d like to achieve this via PHP there are a number of libraries that wrap around this API, for instance: https://github.com/KnpLabs/php-github-api however this is a third party API so we cannot support issues with the libraries implementation directly (you’ll have to raise an issue on the repository itself).