github-tools / github-tools/github

Alternative methods to avoid full tree hierachy request "?recursive=true"

オープン
#93 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement priority 4 (low) PRs welcome
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。