truncated
is true
in the response then the number of items in the tree
array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.curl --location --request GET 'https://api.github.com/repos///git/trees/'
{
"sha": "string",
"tree": [
{
"mode": "100644",
"path": "file.rb",
"properties": {
"mode": {
"type": "string"
},
"path": {
"type": "string"
},
"sha": {
"type": "string"
},
"size": {
"type": "integer"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"path",
"mode",
"type",
"sha",
"url",
"size"
],
"sha": "44b4fc6d56897b048c772eb4087f854f46256132",
"size": 30,
"type": "blob",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132"
}
],
"truncated": true,
"url": "http://example.com"
}
Authorization: Bearer ********************
:tree_sha
. For example, setting recursive
to any of the following will enable returning objects or subtrees: 0
, 1
, "true"
, and "false"
. Omit this parameter to prevent recursively returning objects or subtrees.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通