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");
};
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先定位 this.getSha、this.remove 和 this.move 的實作,接著追蹤它們使用的 _request 呼叫,以及遞迴樹狀請求發出的位置。將這些呼叫與 issue 中描述的 contents endpoint 進行比較。當受影響的操作具備可避免請求完整樹狀階層的替代方案,且其行為已記錄並透過現有的 API wrapper 驗證後,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- api
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100