Open simonw opened 3 years ago
Should also detect the principal branch on a repo if you don't specify one.
Here's a method that can detect the default branch (using a JSON key that was added to GitHub at some point since I last recorded the betamax cassettes in this repo):
def detect_default_branch(self):
return self.session.get(self.base_url(), headers=self.headers()).json()[
"default_branch"
]
You can't even read content from the
main
branch at the moment. Relates to #3.