github-tools / github-tools/github
Alternative methods to avoid full tree hierachy request "?recursive=true"
- Langage dominant
- JavaScript
- Étoiles
- 3.8k
- Forks
- 809
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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");
};
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100