Skip to content

Commit

Permalink
fix(typescript): .git.getTree types (#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and gr2m committed Jan 25, 2020
1 parent e130aee commit 39cdce8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
20 changes: 18 additions & 2 deletions index.d.ts
Expand Up @@ -19285,6 +19285,20 @@ declare namespace Octokit {
ref: string;
url: string;
};
type GitGetTreeResponseTreeItem = {
mode: string;
path: string;
sha: string;
size?: number;
type: string;
url: string;
};
type GitGetTreeResponse = {
sha: string;
tree: Array<GitGetTreeResponseTreeItem>;
truncated: boolean;
url: string;
};
type GitGetTagResponseVerification = {
payload: null;
reason: string;
Expand Down Expand Up @@ -34174,11 +34188,13 @@ declare class Octokit {
endpoint: Octokit.Endpoint;
};
/**
* If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally.
* Returns a single tree using the SHA1 value 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, you can clone the repository and iterate over the Git data locally.
*/
getTree: {
(params?: Octokit.RequestOptions & Octokit.GitGetTreeParams): Promise<
Octokit.AnyResponse
Octokit.Response<Octokit.GitGetTreeResponse>
>;

endpoint: Octokit.Endpoint;
Expand Down
10 changes: 7 additions & 3 deletions scripts/update-endpoints/generated/endpoints.json
Expand Up @@ -22778,7 +22778,7 @@
"url": "/repos/{owner}/{repo}/git/trees/{tree_sha}",
"isDeprecated": false,
"isLegacy": false,
"description": "If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally.",
"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, you can clone the repository and iterate over the Git data locally.",
"documentationUrl": "https://developer.github.com/v3/git/trees/#get-a-tree",
"previews": [],
"headers": [],
Expand Down Expand Up @@ -22839,8 +22839,12 @@
"responses": [
{
"code": 200,
"description": "If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally.",
"examples": null
"description": "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, you can clone the repository and iterate over the Git data locally.",
"examples": [
{
"data": "{\"sha\":\"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\"url\":\"https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\"tree\":[{\"path\":\"file.rb\",\"mode\":\"100644\",\"type\":\"blob\",\"size\":30,\"sha\":\"44b4fc6d56897b048c772eb4087f854f46256132\",\"url\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132\"},{\"path\":\"subdir\",\"mode\":\"040000\",\"type\":\"tree\",\"sha\":\"f484d249c660418515fb01c2b9662073663c242e\",\"url\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e\"},{\"path\":\"exec_file\",\"mode\":\"100755\",\"type\":\"blob\",\"size\":75,\"sha\":\"45b983be36b73c0788dc9cbcb76cbb80fc7bb057\",\"url\":\"https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057\"}],\"truncated\":false}"
}
]
}
],
"renamed": null
Expand Down

0 comments on commit 39cdce8

Please sign in to comment.