github-tools / github-tools/github
Alternative methods to avoid full tree hierachy request "?recursive=true"
- 主要语言
- JavaScript
- 星标
- 3.8k
- 派生
- 809
- PR 合并指标
- 30 天内没有已合并 PR
描述
There are three methods which requests full tree hierarchy ("?recursive=true"):
1. this.getSha
2. this.remove
3. this.move
Sometimes it is very heavy request to get full tree hierarchy. Is it possible to introduce an alternative methods like:
// Remove a file from the tree by sha and path
// -------
this.remove2 = function(branch, path, sha, cb) {
_request("DELETE", repoPath + "/contents/" + path, {"message": "test commit", sha: sha, branch:branch}, cb, "json");
};
2.this.getSha
It is possible to use JSON request for the "/contents/" to get more information about the it:
this.contents2 = function(branch, path, cb) {
_request("GET", repoPath + "/contents/ref=" + branch, { path: path }, cb, "json");
};
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by locating the implementations of this.getSha, this.remove, and this.move, then trace the _request calls they use and where the recursive tree request is made. Compare those calls with the contents endpoint described in the issue. Done means the affected operations have alternatives that avoid requesting the full tree hierarchy, with their behavior documented and verified against the existing API wrapper.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- api
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100