jenkinsci / jenkinsci/java-client-api
Enhancement: re-work crumbFlag handling
- Lenguaje dominante
- Java
- Estrellas
- 913
- Forks
- 466
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Currently the way to handle the crumbFlag is not very intuitive and even not complete. Some methods offer a parameter "crumbFlag" but other dont (see #350).
IMHO it would be better to handle this internally in the library or at least in one central place. So my suggestion is to have a new constructor:
`new JenkinsServer(..., boolean crumbFlag)`
Furthermore, if no crumbFlag is specified (by using the existing constructors) the library itself determines if the crumbFlag should be set or not by calling
```
String json = client.get("api/json");
boolean crumbFlag = new JsonObject(json).get("useCrumbs").getAsBoolean();
```
This would allow to cleanup the API from all overloaded methods that allow passing a "crumbFlag" parameter.
Guía de contribución
Línea de trabajo
Empieza por los constructores de JenkinsServer y los métodos que actualmente exponen un parámetro crumbFlag. Traza el punto de entrada client.get("api/json") y las sobrecargas existentes; se considera terminado cuando el manejo de crumb esté centralizado, haya disponible un constructor boolean opcional y se hayan eliminado los parámetros crumbFlag redundantes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- api
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100