Plan 01 — Problem and Goal
Context¶
Commitizen's built-in Markdown changelog format has no YAML frontmatter
awareness. The RE_TITLE regex matches # lines inside frontmatter as
headings, causing search_version to extract false versions (e.g. 2.0 from
Apache-2.0). Upstream declined a hardcoded fix
(woile's response) — the recommended path is a custom
commitizen.changelog_format plugin.
See docs/changelog.md for the affected file and
issue #2014 for the full discussion.
Tasks¶
- Reproduce the bug. Run
cz bump --dry-run --changelogagainstdocs/changelog.mdand confirmNoRevisionError(exit code 16) or false version detection.- See
scripts/reproduce_bug.pyfor reproduction.
- See
- Confirm upstream position. Issue #2014 is closed; woile's comment directs users to create a custom plugin — no fix expected upstream.
- Document root cause. Added summary of why
RE_TITLEmatches#inside frontmatter and howsearch_versionextracts2.0fromApache-2.0.- See
scripts/reproduce_bug.pydocstring and Step 1 output.
- See
- Sign off on plugin approach. Confirmed — custom
commitizen.changelog_formatentry point is the agreed path forward. - Read upstream docs and templates. Reviewed the changelog template customization, config file customization, Python class customization, and cookiecutter template — summarized in reproduction script.
- Read BaseFormat and Markdown sources. Reviewed (base-source, markdown-source) to understand the override points before Plan 02.
Dependencies¶
- git repo with a commitizen-managed changelog containing SPDX frontmatter
commitizen>=3.0installed locally (venv oruv tool)
Acceptance¶
- Bug reproduced and confirmed
- Upstream path is authoritatively closed
- Plugin approach formally agreed by the team
Next¶
→ Continue to Plan 02 — Scaffolding