diff --git a/README.md b/README.md index 9b23a7d..dc780c6 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ jobs: | `prerelease` | Set as prerelease {alpha,beta,rc} choose type of prerelease | - | | `extra_requirements` | Custom requirements, if your project uses a custom rule or plugins, you can specify them separated by a space. E.g: `'commitizen-emoji conventional-JIRA'` | - | | `changelog_increment_filename` | Filename to store the incremented generated changelog. This is different to changelog as it only contains the changes for the just generated version. Example: `body.md` | - | +| `git_redirect_stderr` | Redirect git output to stderr. Useful if you do not want git output in your changelog | `false` | | `git_name` | Name used to configure git (for git operations) | `github-actions[bot]` | | `git_email` | Email address used to configure git (for git operations) | `github-actions[bot]@users.noreply.github.com` | | `push` | Define if the changes should be pushed to the branch. | true | diff --git a/action.yml b/action.yml index d3e5d16..7eeb88e 100644 --- a/action.yml +++ b/action.yml @@ -52,6 +52,10 @@ inputs: changelog_increment_filename: description: 'Filename to store the incremented generated changelog. This is different to changelog as it only contains the changes for the just generated version' required: false + git_redirect_stderr: + description: 'Redirect git output to stderr. Useful if you do not want git output in your changelog' + required: false + default: "false" git_name: description: 'Name used to configure git (for git operations)' required: false diff --git a/entrypoint.sh b/entrypoint.sh index 8a6a7d7..c8b1f6f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -65,6 +65,9 @@ fi if [[ $INPUT_CHECK_CONSISTENCY ]]; then CZ_CMD+=('--check-consistency') fi +if [[ $INPUT_GIT_REDIRECT_STDERR == 'true' ]]; then + CZ_CMD+=('--git-output-to-stderr') +fi if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then CZ_CMD+=('--changelog-to-stdout') echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME"