Related problem: How do I find the default branch for a repository using the Github v3 API
Different from the related problem, I want to list the files of the default branch.
The API I know to list files of the master
branch is:
https://api.github.com/repos/owner/repo_name/git/trees/master
However, the default branch name could be main
.
Is there a way to list files of the default branch through only one query?