according this post: Using CURL to list github repository tree (github API) the way to get the complete file listing recursively is to start by passing the tree sha to the endpoint.
The answer provided suggests that you can use the sha from a commit, but that only seems to get information for that commit, and the question that was asked, "how do you get the sha for a tree" remains unanswered.
I'd like to know this, and I don't want to get into dozens or hundreds of queries. I'm dealing with small repos that may have a half dozen directory levels, and maybe 200 files, all svgs.
What's the trick here? The documentation isn't that helpful, almost as though this were a task not many people need to do, which seems really unlikely.