Skip to content

docs(customization): verify executable no-bump plugin example - #2098

Draft
bearomorphism wants to merge 1 commit into
masterfrom
fm/commitizen-doc-example-checks
Draft

bearomorphism wants to merge 1 commit into
masterfrom
fm/commitizen-doc-example-checks

Conversation

@bearomorphism

@bearomorphism bearomorphism commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This draft follow-up verifies the published Python-class bump-rule example from a single shared source.

It updates the docs to include docs/examples/cz_docs_only.py, type-checks that example through the normal mypy path, and adds focused runtime tests proving that bump_map = {"docs": None} yields no increment for docs: commits while fix: commits still produce a PATCH bump. The example pattern is also tightened so nearby false positives such as fixup!, fixture, and fix! do not silently produce a bump.

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)

Generated-by: Pi following the guidelines

Code Changes

  • Add test cases to all the changes you introduce
  • Run uv run poe all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run uv run poe doc locally to ensure the documentation pages renders correctly
  • Check and fix any broken links (internal or external)

Expected Behavior

The documented custom plugin example is the same Python file that documentation publishes, mypy checks, and the test suite executes. A docs: commit matched by that example produces no increment, a normal fix: commit produces a PATCH increment, and nearby false positives such as fixup!, fixture, and fix! do not silently produce a PATCH bump.

Steps to Test This Pull Request

  1. Run uv run ruff check.
  2. Run uv run mypy.
  3. Run uv run pytest tests/commands/test_documented_python_class_examples.py.
  4. Run uv run prek run --all-files.
  5. Run uv run mkdocs build.
  6. Confirm docs/customization/python_class.md includes docs/examples/cz_docs_only.py and that the example remains consistent with the tested module.

Additional Context

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🔍 Commitizen bump preview

Merging this PR will produce the following bump:

bump: version 4.19.0 → 4.19.1
tag to create: v4.19.1
increment detected: PATCH

## v4.19.1 (2026-10-01)

### Fix

- **types**: allow documented None bump_map values

### Refactor

- **bump**: replace find_increment with VersionIncrement max

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@bearomorphism bearomorphism changed the title fix(bump): support None-mapped custom bump rules docs(customization): verify executable no-bump plugin example Oct 1, 2026
Base automatically changed from fm/commitizen-bumprule-pr to master October 3, 2026 09:14
@bearomorphism
bearomorphism marked this pull request as draft October 3, 2026 09:15
@bearomorphism
bearomorphism force-pushed the fm/commitizen-doc-example-checks branch from 1b4d492 to a5b92a1 Compare October 5, 2026 06:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant