From c3f2719de39368f374861a93769ab26fb36ee720 Mon Sep 17 00:00:00 2001 From: Dave Barnow Date: Tue, 12 Sep 2023 13:57:47 -0400 Subject: [PATCH] feat: add no_verify variable --- README.md | 1 + action.yml | 8 ++++++-- entrypoint.sh | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b23a7d..fe9f25f 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ jobs: | `check_consistency` | Check consistency among versions defined in commitizen configuration and version_files | `false` | | `gpg_sign` | If true, use GPG to sign commits and tags (for git operations). Requires separate setup of GPG key and passphrase in GitHub Actions (e.g. with the action `crazy-max/ghaction-import-gpg`) | `false` | | `debug` | Prints debug output to GitHub Actions stdout | `false` | +| `no_verify` | If true, bypasses the pre-commit and commit-msg hooks | false | ## Outputs diff --git a/action.yml b/action.yml index d3e5d16..4f51a33 100644 --- a/action.yml +++ b/action.yml @@ -83,6 +83,10 @@ inputs: required: false default: "false" debug: - description: "If true, prints debug output to GitHub Actions stdout." + description: 'If true, prints debug output to GitHub Actions stdout.' required: false - default: "false" + default: 'false' + no_verify: + description: 'If true, bypasses the pre-commit and commit-msg hooks' + required: false + default: 'false' diff --git a/entrypoint.sh b/entrypoint.sh index 8a6a7d7..df258f6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -69,6 +69,9 @@ if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then CZ_CMD+=('--changelog-to-stdout') echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME" "${CZ_CMD[@]}" >"$INPUT_CHANGELOG_INCREMENT_FILENAME" + if [[ $INPUT_NO_VERIFY == 'true' ]]; then + CZ_CMD+=('--no-verify') + fi else echo "${CZ_CMD[@]}" "${CZ_CMD[@]}"