Skip to content

Commit 03170e5

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 2237fed commit 03170e5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

content/v3/git/trees.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ title: Git Trees | GitHub API
1616
<%= headers 200 %>
1717
<%= json :tree %>
1818

19+
<%= fetch_content(:fetch_more_trees) %>
20+
1921
## Get a Tree Recursively
2022

2123
GET /repos/:owner/:repo/git/trees/:sha?recursive=1
@@ -25,6 +27,8 @@ title: Git Trees | GitHub API
2527
<%= headers 200 %>
2628
<%= json :tree_extra %>
2729

30+
<%= fetch_content(:fetch_more_trees) %>
31+
2832
## Create a Tree
2933

3034
The tree creation API will take nested entries as well. If both a

lib/resources.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def webhook_payload(event_name)
118118
end
119119

120120
CONTENT ||= {
121-
"PUT_CONTENT_LENGTH" => "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](/v3/#http-verbs).\""
121+
"PUT_CONTENT_LENGTH" => "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](/v3/#http-verbs).\"",
122+
"FETCH_MORE_TREES" => "{{#tip}}\n\nIf `truncated` is `true`, 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{{/tip}}"
122123
}
123124

124125
def fetch_content(key)
@@ -1339,7 +1340,8 @@ def fetch_content(key)
13391340
"sha" => "45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
13401341
"url" => "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
13411342
}
1342-
]
1343+
],
1344+
"truncated" => false
13431345
}
13441346
TREE_EXTRA ||= {
13451347
"sha" => "fc6274d15fa3ae2ab983129fb037999f264ba9a7",
@@ -1351,7 +1353,8 @@ def fetch_content(key)
13511353
"size" => 132,
13521354
"sha" => "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
13531355
"url" => "https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
1354-
} ]
1356+
} ],
1357+
"truncated" => false
13551358
}
13561359
TREE_NEW ||= {
13571360
"sha" => "cd8274d15fa3ae2ab983129fb037999f264ba9a7",

0 commit comments

Comments
 (0)