commitizen / commitizen/cz-cli
Is it possible to get branch name in a adapter?
- Lingua principale
- JavaScript
- Stelle
- 17.5k
- Fork
- 566
- Merge medio
- 8h 16m
- PR unite (30g)
- 1
Descrizione
Hi,
First of all, great project!
Is it possible to pass information about a branch (or some other git information) to an custom adapter?
I find this line: https://github.com/commitizen/cz-cli/blob/master/src/cli/strategies/git-cz.js#L59 where it looks like you are passing all arguments to `git`(?). Is it possible to parse the arguments and exclude `cz-cli`-specific arguments and pass them to a adapter?
Example:
```
$ git cz --author="Name " --cz-branch-name="$(git rev-parse --abbrev-ref HEAD)"
```
The command above should pass `--author` to `git commit` and `--cz-branch-name` to the adapter (because the argument starts with `--cz-`).
What do you think? Is this a good solution? Or is it a better way?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da src/cli/strategies/git-cz.js alla riga collegata e traccia il percorso degli argomenti del comando fino a git e agli adapter personalizzati. L’issue richiede un design definito per il passaggio degli argomenti; il completamento dovrebbe includere l’accesso dell’adapter al branch o ad altri metadati Git senza compromettere gli argomenti destinati a git commit.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, javascript
- Ambito
- cli, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100