
This function hardcodes the main branch when fetching the repository tree. This will fail for repositories where the default branch is different (e.g., master). To make this more robust, you should first fetch the repository's details to get its default_branch, and then use that branch name in this API call.
Originally posted by @gemini-code-assist[bot] in #7 (comment)