Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reads are hard-coded to master (not main) #5

Open
simonw opened this issue Feb 24, 2021 · 2 comments
Open

Reads are hard-coded to master (not main) #5

simonw opened this issue Feb 24, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented Feb 24, 2021

You can't even read content from the main branch at the moment. Relates to #3.

@simonw simonw added the bug Something isn't working label Feb 24, 2021
@simonw
Copy link
Owner Author

simonw commented Feb 24, 2021

Should also detect the principal branch on a repo if you don't specify one.

simonw added a commit that referenced this issue Feb 24, 2021
@simonw
Copy link
Owner Author

simonw commented Feb 24, 2021

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"
        ]

simonw added a commit that referenced this issue Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant