github-tools / github-tools/github

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

Đang mở
#93 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement priority 4 (low) PRs welcome
Ngôn ngữ chính
JavaScript
Star
3.8k
Fork
809
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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");
};

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.