trees
Overview
Name | trees |
Type | Resource |
Id | github.git.trees |
Fields
Name | Datatype | Description |
---|---|---|
sha | string | |
tree | array | Objects specifying a tree structure |
truncated | boolean | |
url | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_tree | SELECT | owner, repo, tree_sha | Returns a single tree using the SHA1 value or ref name for that tree. 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.Note: The limit for the tree array is 100,000 entries with a maximum size of 7 MB when using the recursive parameter. |
create_tree | INSERT | owner, repo, data__tree | The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "Create a commit" and "Update a reference." Returns an error if you try to delete a file that does not exist. |