closest I got is: https://developer.apple.com/forums/thread/710472?answerId=742769022#742769022
it must require a lot of apis to find the values if you have many branches(>200). I'm still unable to get the branch names and gitreferences correctly
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: