commitizen / commitizen/cz-cli

Provide easier access to commitizen config to prompters

Abierto
#757 2 comentarios 3 reacciones 0 asignados Ver en GitHub
adapter enhancement
Lenguaje dominante
JavaScript
Estrellas
17.5k
Forks
566
Merge medio
8 h 16 min
PR fusionados (30 d)
1

Descripción

Currently when writing a prompter, e.g., cz-conventional-commit, if you wish to integrate with commitizen configuration then you need to do the following:

```
var configLoader = require('commitizen').configLoader;
configLoader.load() // synchronous, not a promise
```

I think it'd be nicer to actually have commitizen inject said configuration into prompters, e.g.,

```
module.exports = {
prompter: function myAdapter(inquirer, config, commit) {
}
}
```

This would remove the backwards dependency from prompters to commitizen, and reduce the need to test that config actually was loaded correctly when testing prompters, and allow for standardised configuration between all prompters. It could also be done in a backwards compatible manner by checking the length of the prompter function (that tells you how many arguments it expects)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.