Skip to content

Commit e0a7d58

Browse files
bearomorphismCopilot
authored andcommitted
fix(examples): place --no-raise before bump subcommand
`--no-raise` is a top-level commitizen option, so it must appear before the `bump` subcommand. With it placed after, argparse treats `--no-raise 21` as unknown trailing arguments and the CLI exits with code 18 (`INVALID_COMMAND_ARGUMENT`): Invalid commitizen arguments were found: `--no-raise`. Please use -- separator for extra git args This is what failed the bump workflow on commitizen-tools/commitizen master in run 25542335831, which copy-pasted the same pattern from these examples. Move the option before `bump` in both examples and add a comment so future readers do not repeat the mistake. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8d4b4e8 commit e0a7d58

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

examples/bump-release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
- id: bump-version
2424
run: |
2525
old_sha="$(git rev-parse HEAD)"
26-
# Pass --no-raise 21 so that pushing only non-bump-eligible commits
27-
# (e.g. docs:, ci:, build(deps):) does not fail the workflow.
28-
cz bump --yes --annotated-tag --no-raise 21
26+
# Pass `--no-raise 21` so that pushing only non-bump-eligible commits
27+
# (e.g. docs:, ci:, build(deps):) does not fail the workflow. Note
28+
# that `--no-raise` is a top-level option and must come before the
29+
# `bump` subcommand. Exit code 21 is NO_COMMITS_TO_BUMP.
30+
cz --no-raise 21 bump --yes --annotated-tag
2931
3032
if [ "$(git rev-parse HEAD)" = "$old_sha" ]; then
3133
echo "No bump-eligible commits found, skipping release."

examples/trigger-other-job/.github/workflows/bump-release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
run: |
2525
old_version="$(cz version -p)"
2626
old_sha="$(git rev-parse HEAD)"
27-
# Pass --no-raise 21 so that pushing only non-bump-eligible commits
28-
# (e.g. docs:, ci:, build(deps):) does not fail the workflow.
29-
cz bump --yes --annotated-tag --no-raise 21
27+
# Pass `--no-raise 21` so that pushing only non-bump-eligible commits
28+
# (e.g. docs:, ci:, build(deps):) does not fail the workflow. Note
29+
# that `--no-raise` is a top-level option and must come before the
30+
# `bump` subcommand. Exit code 21 is NO_COMMITS_TO_BUMP.
31+
cz --no-raise 21 bump --yes --annotated-tag
3032
3133
if [ "$(git rev-parse HEAD)" = "$old_sha" ]; then
3234
echo "No bump-eligible commits found, skipping release."

0 commit comments

Comments
 (0)