commitizen / commitizen/cz-cli
Input to `BREAKING CHANGE commit requires a body` isn't used
- 主要言語
- JavaScript
- スター
- 17.5k
- フォーク
- 566
- 平均マージ
- 8時間 16分
- マージ済み PR(30日)
- 1
説明
- The input given to `? A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself:` isn't used
- This prompt pops up when `Provide a longer description of the change` is skipped
- Potentially related to #718
## Actual Behaviour
- Given the following:
```
$ git cz --allow-empty
cz-cli@4.1.2, cz-conventional-changelog@3.2.0
? Select the type of change that you're committing: feat: A new feature
? What is the scope of this change (e.g. component or file name): (press enter to skip) foo
? Write a short, imperative tense description of the change (max 89 chars):
(25) my very short description
? Provide a longer description of the change: (press enter to skip)
? Are there any breaking changes? Yes
? A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself:
My longer description for a breaking change
? Describe the breaking changes:
The breaking change itself
? Does this change affect any open issues? No
[master 58da0e1] feat(foo): my very short description
```
- Running `git log` gives:
```
commit 58da0e199964ec5c50b3521f385deee2d1dfe218
Author: Nicholas Nadeau
Date: Mon Sep 14 21:42:01 2020 -0400
feat(foo): my very short description
BREAKING CHANGE: The breaking change itself
```
- Notice that the `My longer description for a breaking change` provided to the prompt is not part of the git log
## Expected Behaviour
- Alternatively, we can remember to provide a longer description from the start:
```
$ git cz --allow-empty
cz-cli@4.1.2, cz-conventional-changelog@3.2.0
? Select the type of change that you're committing: feat: A new feature
? What is the scope of this change (e.g. component or file name): (press enter to skip) bar
? Write a short, imperative tense description of the change (max 89 chars):
(25) another short description
? Provide a longer description of the change: (press enter to skip)
Now I directly provide a longer description
? Are there any breaking changes? Yes
? Describe the breaking changes:
Here I describe why I broke things
? Does this change affect any open issues? No
[master fcd9863] feat(bar): another short description
```
- `git log` now shows:
```
commit fcd986317222ee08076b10650bcbd5ba16cb377f (HEAD -> master)
Author: Nicholas Nadeau
Date: Mon Sep 14 21:44:04 2020 -0400
feat(bar): another short description
Now I directly provide a longer description
BREAKING CHANGE: Here I describe why I broke things
```
コントリビューションガイド
調査の方向性
示されているプロンプトのシーケンスを使用して `git cz --allow-empty` で問題を再現し、その後、コマンドラインプロンプトの処理とコミットメッセージの組み立てを調査します。`A BREAKING CHANGE commit requires a body` で入力したテキストが breaking-change の説明とともに `git log` に表示され、最初の body をスキップするケースをテストでカバーできれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, javascript
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100