Fetches the complete file tree of a GitHub repository in two API calls
(repo metadata + recursive tree), rather than the N-request recursive
/contents/ crawl used by github_files().
Value
a list with:
gatedlogical;
TRUEonly when the repository could not be listed at all (invalid/inaccessible, or a truncated tree)reasoncharacter reason, or
NAfilesdata.frame shaped like
github_files()output, orNULLwhen the tree could not be fetcheddefault_branchcharacter
licensecharacter licence key, or NA
Details
A repository is listed in full whatever its size, matching how every other
archive source (OSF, Zenodo, ResearchBox, PsychArchives, local) is treated.
Because the Git Trees API returns the whole tree in ONE request, listing a
large repository costs no more than listing a small one, so there is nothing
to protect against at this stage. What a repository's size does limit is how
much of it is DOWNLOADED, and that is handled downstream by
download_repo_files()'s per-file and per-repository budgets, which
fill smallest-file-first up to the cap and report what was omitted.
The one case that still refuses is GitHub's own hard API limit: a tree with
more than 100,000 entries comes back flagged truncated, meaning the
response is incomplete. There is no way to list such a repository through
this endpoint, so it is reported rather than silently returning a partial
file list.
