commitizen / commitizen/cz-cli
Provide easier access to commitizen config to prompters
- Vorherrschende Sprache
- JavaScript
- Sterne
- 17.5k
- Forks
- 566
- Ø Merge
- 8 Std. 16 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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)
Beitragsleitfaden
Rechercherichtung
Beginne damit nachzuverfolgen, wie commitizen derzeit über configLoader Konfiguration lädt und Adapter-Prompter wie cz-conventional-commit aufruft. Lege fest, wie die Konfiguration den Prompter erreicht, wobei das bestehende Argumentverhalten erhalten bleibt, und überprüfe anschließend, dass Adapter die injizierte Konfiguration verwenden können, ohne commitizen selbst zu laden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- cli, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100