master is hard-coded as the branch to use, rather than the default branch of the repo. The default branch is available when the repos are listed, in the "default_branch" attrib of the repo information.
GitHub uses now main as its default branch name (see https://github.com/github/renaming)