github-tools / github-tools/github

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

Abierto
#93 2 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement priority 4 (low) PRs welcome
Lenguaje dominante
JavaScript
Estrellas
3.8k
Forks
809
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
api
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.