feat: Add option in bump command to redirect git output to stderr #735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add an option to redirect git command output to stderr instead of stdout.
This is useful used in conjunction with
--changelog-to-stdout
if you don't need/want the resulting output to contain thegit commit
log messages.Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
When issuing
cz bump --changelog-to-stdout > file.md
,file.md
will contain the git output of thegit commit
command (eg. something like[<branche> <SHA>] bump: x.y.z -> a.b.c + diffstats
. When passing the--git-output-to-stderr
option, this output is written to stderr instead of stdout allowing the resulting file to only contain changelog-related stuff.Steps to Test This Pull Request
cz bump --changelog-to-stdout --git-output-to-stderr > body.md
Additional context