commitizen / commitizen/cz-cli
Is it possible to get branch name in a adapter?
- Langage dominant
- JavaScript
- Étoiles
- 17.5k
- Forks
- 566
- Merge moyen
- 8 h 16 min
- PR mergées (30 j)
- 1
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par src/cli/strategies/git-cz.js à la ligne indiquée et retracez la manière dont les arguments de commande parviennent à git et aux adaptateurs personnalisés. L’issue nécessite une conception définie du passage des arguments ; le travail terminé devrait inclure l’accès de l’adaptateur à la branche ou à d’autres métadonnées Git sans perturber les arguments destinés à git commit.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git, javascript
- Domaine
- cli, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100