Skip to content

Commit f835e0a

Browse files
authored
fix: tweak documentation for git.getTree (GET /repos/{owner}/{repo}/git/trees/{tree_sha}) to clarify maximum limits on size and number of entries (#550)
WIP octokit/openapi updated
1 parent 80ef72d commit f835e0a

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

docs/git/getTree.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Returns a single tree using the SHA1 value for that tree.
1212

1313
If `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.
1414

15+
**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter.
16+
1517
```js
1618
octokit.rest.git.getTree({
1719
owner,

scripts/update-endpoints/generated/endpoints.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22414,7 +22414,7 @@
2241422414
"isDeprecated": false,
2241522415
"deprecationDate": null,
2241622416
"removalDate": null,
22417-
"description": "Returns a single tree using the SHA1 value for that tree.\n\nIf `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.",
22417+
"description": "Returns a single tree using the SHA1 value for that tree.\n\nIf `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.\n\n\n**Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter.",
2241822418
"documentationUrl": "https://docs.github.com/rest/reference/git#get-a-tree",
2241922419
"previews": [],
2242022420
"headers": [],
@@ -63248,6 +63248,15 @@
6324863248
}
6324963249
],
6325063250
"responses": [
63251+
{
63252+
"code": 200,
63253+
"description": "Response when the updated information already exists",
63254+
"examples": [
63255+
{
63256+
"data": "{\"id\":1,\"node_id\":\"MDQ6VGVhbTE=\",\"url\":\"https://api.github.com/teams/1\",\"html_url\":\"https://github.com/orgs/github/teams/justice-league\",\"name\":\"Justice League\",\"slug\":\"justice-league\",\"description\":\"A great team.\",\"privacy\":\"closed\",\"permission\":\"admin\",\"members_url\":\"https://api.github.com/teams/1/members{/member}\",\"repositories_url\":\"https://api.github.com/teams/1/repos\",\"parent\":null,\"members_count\":3,\"repos_count\":10,\"created_at\":\"2017-07-14T16:53:42Z\",\"updated_at\":\"2017-08-17T12:37:15Z\",\"organization\":{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"updated_at\":\"2017-08-17T12:37:15Z\",\"type\":\"Organization\"}}"
63257+
}
63258+
]
63259+
},
6325163260
{
6325263261
"code": 201,
6325363262
"description": "Response",
@@ -63256,7 +63265,10 @@
6325663265
"data": "{\"id\":1,\"node_id\":\"MDQ6VGVhbTE=\",\"url\":\"https://api.github.com/teams/1\",\"html_url\":\"https://github.com/orgs/github/teams/justice-league\",\"name\":\"Justice League\",\"slug\":\"justice-league\",\"description\":\"A great team.\",\"privacy\":\"closed\",\"permission\":\"admin\",\"members_url\":\"https://api.github.com/teams/1/members{/member}\",\"repositories_url\":\"https://api.github.com/teams/1/repos\",\"parent\":null,\"members_count\":3,\"repos_count\":10,\"created_at\":\"2017-07-14T16:53:42Z\",\"updated_at\":\"2017-08-17T12:37:15Z\",\"organization\":{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"updated_at\":\"2017-08-17T12:37:15Z\",\"type\":\"Organization\"}}"
6325763266
}
6325863267
]
63259-
}
63268+
},
63269+
{ "code": 403, "description": "Forbidden", "examples": null },
63270+
{ "code": 404, "description": "Resource not found", "examples": null },
63271+
{ "code": 422, "description": "Validation failed", "examples": null }
6326063272
],
6326163273
"renamed": null
6326263274
},
@@ -63982,7 +63994,7 @@
6398263994
"enum": null,
6398363995
"allowNull": false,
6398463996
"mapToData": null,
63985-
"validation": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ",
63997+
"validation": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) |^(sk-ssh-ed25519|sk-ecdsa-sha2-nistp256)@openssh.com ",
6398663998
"alias": null,
6398763999
"deprecated": null
6398864000
}

src/generated/method-types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4760,6 +4760,9 @@ export type RestEndpointMethods = {
47604760
* Returns a single tree using the SHA1 value for that tree.
47614761
*
47624762
* If `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.
4763+
*
4764+
*
4765+
* **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter.
47634766
*/
47644767
getTree: {
47654768
(

0 commit comments

Comments
 (0)