Open rebelzach opened 8 years ago
Nice, a PR is definitely welcome! I would map the error to the GitHub response, since GitHub is returning a 200 when the truncated tree is shown I would also truncate the response. Can you see how high limited is until it is truncated?
I'm planning to do a PR for refs and trees (then eventually files). Thought I'd share my plan and get any feedback. Here is the draft interface for trees (refs should be straightforward), the unique bit might be in how the tree structure gets returned. Composing the objects into a tree is an extra step that makes sense to me, but doesn't mirror the API response, so I'm interested to hear your thoughts.
Also, I'm wondering if truncated trees should be treated as an error response, it could certainly just be a property on the
Tree
object but it feels like its an error to not more explicitly handle it, I could see using aTreeResponse
enum with the response case ofTruncated
that still passes along the tree.