commitizen / commitizen/cz-cli
Is it possible to get branch name in a adapter?
- 主要言語
- JavaScript
- スター
- 17.5k
- フォーク
- 566
- 平均マージ
- 8時間 16分
- マージ済み PR(30日)
- 1
説明
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?
コントリビューションガイド
調査の方向性
リンク先の行にある src/cli/strategies/git-cz.js から始め、コマンド引数が git とカスタムアダプターにどのように渡されるかを追跡してください。この issue では、引数の受け渡しに関する明確な設計が必要です。完了条件には、git commit 向けの引数を壊すことなく、アダプターがブランチやその他の Git メタデータにアクセスできることを含めてください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, javascript
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100