Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
583acf4
docs(config): split the configuration documentation into pages
bearomorphism Nov 19, 2025
3cb9b2c
docs(exit_codes.md): move "ignoring errors" from bump doc to exit_cod…
bearomorphism Dec 10, 2025
d7cf81c
docs(bump): fix broken documentation format
bearomorphism Dec 10, 2025
6e8edcd
ci(github-actions): add python 3.14 to github-actions and tox
Lee-W Nov 16, 2025
04d5304
refactor(bump): rename parameter and variables
bearomorphism Nov 17, 2025
b91ceb1
build: update dev dependencies
Lee-W Nov 8, 2025
82caf4b
refactor(changelog): raise NotAllow when file_name not passed instead…
Lee-W Nov 8, 2025
1960970
style(ruff): enable S101 check to avoid assert usage in production code
Lee-W Nov 8, 2025
7d6ae2d
fix(bump): remove NotAllowed related to --get-next option, other rela…
bearomorphism Nov 10, 2025
34cff20
refactor(bump): extract option validation and new version resolution …
bearomorphism Nov 11, 2025
8421bb1
refactor(cargo_provider): cleanup and get rid of potential type errors
bearomorphism Sep 13, 2025
7529611
docs(exit-codes): general update
bearomorphism Nov 20, 2025
c8c91f1
test: replace try with pytest.raises (#1654)
bearomorphism Dec 3, 2025
e2081c8
fix(git): replace lstrip with strip for compatibility issue
bearomorphism Dec 3, 2025
755fd82
perf: add TYPE_CHECKING to CzQuestion imports
bearomorphism Dec 3, 2025
bc2ba39
fix(cli): debug and no_raise can be used together in sys.excepthook
bearomorphism Dec 3, 2025
1441c3d
perf(ruff): enable ruff rules TC001~TC006
bearomorphism Dec 4, 2025
609011c
fix(version): fix the behavior of cz version --major
bearomorphism Nov 22, 2025
5b471c3
refactor(version): rename class member to align with other classes
bearomorphism Nov 27, 2025
9473ef3
docs(cli/screenshots): update CLI screenshots
github-actions[bot] Dec 11, 2025
c2ae121
bump: version 4.10.0 → 4.10.1
github-actions[bot] Dec 11, 2025
2b0b4d8
docs: add missing site_url
bearomorphism Dec 11, 2025
30bb513
build: add missing dark mode back
bearomorphism Dec 11, 2025
1e5869e
style(mkdocs.yml): make indent consistent in nav section
bearomorphism Dec 11, 2025
b78e303
build: update dev dependencies
Lee-W Nov 8, 2025
8b1fad6
feat: add custom validation
benediktziegler Dec 1, 2025
8265c90
feat: Drop support for Python 3.9 as EOL reached and add Python 3.14 …
Lee-W Nov 16, 2025
2072f8e
style: remove Python 3.9 compatible code
Lee-W Nov 16, 2025
c0da2e6
docs: fix some format issues in docs
bearomorphism Dec 12, 2025
b64c6f6
docs: fix broken links in doc
Parkerhiphop Dec 13, 2025
ce4f408
refactor: migrate from Poetry to uv for dependency management and bui…
YazdanRa Dec 19, 2025
a587af3
ci: add link checker
bearomorphism Dec 6, 2025
12ddd37
ci(deps): bump actions/checkout from 5 to 6
dependabot[bot] Dec 25, 2025
c41d19b
ci: fix syntax error in links.yml workflow
bearomorphism Dec 26, 2025
8c57f63
ci: add configuration file for link checker
bearomorphism Dec 27, 2025
57cd232
build: update dev dependencies
Lee-W Nov 8, 2025
f226ea0
feat: add custom validation
benediktziegler Dec 1, 2025
b494695
feat: Drop support for Python 3.9 as EOL reached and add Python 3.14 …
Lee-W Nov 16, 2025
f1fd29f
style: remove Python 3.9 compatible code
Lee-W Nov 16, 2025
b394425
test(commands): centralize all --help tests in a file to dedup code
bearomorphism Dec 13, 2025
392a654
build(tox): do not use poetry anymore and use the builtin `dependency…
noirbizarre Dec 21, 2025
11467ce
test(tox): ensure all tests can run from any directory
noirbizarre Dec 28, 2025
cf03c8d
bump: version 4.10.1 → 4.11.0
github-actions[bot] Dec 29, 2025
98321b1
ci: fix the issue lychee.toml was not consumed correctly
bearomorphism Dec 29, 2025
a726088
Merge remote-tracking branch 'upstream/HEAD' into feature/uv
YazdanRa Dec 29, 2025
37abd51
build: update poethepoet dependency to version 0.34.0
YazdanRa Dec 29, 2025
9dda9c5
fix: update tox configuration to use dependency groups for test envir…
YazdanRa Dec 29, 2025
95f5d79
fix: update check-commit command to use uv instead of poetry
YazdanRa Dec 29, 2025
1bd0898
refactor: remove unused poetry_command from tool.poe in pyproject.toml
YazdanRa Dec 29, 2025
db62bad
feat: set executor type to "uv" in tool.poe section of pyproject.toml
YazdanRa Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please fill in the following content to let us know better about this change.
### Code Changes

- [ ] Add test cases to all the changes you introduce
- [ ] Run `poetry all` locally to ensure this change passes linter check and tests
- [ ] 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
Expand All @@ -24,10 +24,10 @@ Please fill in the following content to let us know better about this change.

### Documentation Changes

- [ ] Run `poetry doc` locally to ensure the documentation pages renders correctly
- [ ] Run `uv run poe doc` locally to ensure the documentation pages renders correctly
- [ ] Check and fix any broken links (internal or external) in the documentation

> When running `poetry doc`, any broken internal documentation links will be reported in the console output like this:
> When running `uv run poe doc`, any broken internal documentation links will be reported in the console output like this:
>
> ```text
> INFO - Doc file 'config.md' contains a link 'commands/bump.md#-post_bump_hooks', but the doc 'commands/bump.md' does not contain an anchor '#-post_bump_hooks'.
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/docspublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ jobs:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install -U pip poetry poethepoet
poetry --version
poetry install --only main,script
uv --version
uv sync --locked --group script
- name: Update CLI screenshots
run: |
poetry doc:screenshots
uv run poe doc:screenshots
- name: Commit and push updated CLI screenshots
run: |
git config --global user.name "github-actions[bot]"
Expand All @@ -51,14 +50,13 @@ jobs:
run: |
git pull origin master
- name: Set up Python
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install -U pip poetry poethepoet
poetry --version
poetry install --no-root --only documentation
uv --version
uv sync --locked --only-group documentation
- name: Generate Sponsors 💖
uses: JamesIves/github-sponsors-readme-action@v1
with:
Expand All @@ -69,7 +67,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry doc:build
uv run poe doc:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/homebrewpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install -U commitizen
run: uv pip install -U commitizen
- name: Set Project version env variable
run: |
echo "project_version=$(cz version --project)" >> $GITHUB_ENV
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Links

on:
repository_dispatch:
workflow_dispatch:
pull_request:
schedule:
- cron: "00 18 * * *"

jobs:
check-links:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
- uses: actions/checkout@v6

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --config lychee.toml .
fail: false

- name: Broken Links Report
if: steps.lychee.outputs.exit_code != 0 && github.event_name == 'schedule'
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');

// Read the markdown file
// Ensure the path is correct relative to the workspace root
const reportBody = fs.readFileSync('./lychee/out.md', 'utf8');

await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Broken Links Report',
body: reportBody
});
11 changes: 5 additions & 6 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ jobs:
python-check:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
platform: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip poetry poethepoet
poetry --version
poetry install --only main,linters,test
uv --version
uv sync --locked --dev --group test --group linters
- name: Run tests and linters
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
poetry ci
uv run poe ci
shell: bash
- name: Upload coverage to Codecov
if: runner.os == 'Linux'
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@ jobs:
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
uses: astral-sh/setup-uv@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install -U pip poetry
poetry --version
- name: Build
run: uv build
- name: Publish
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: poetry publish --build
run: uv publish
Comment thread
YazdanRa marked this conversation as resolved.
18 changes: 13 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ repos:
args: [ '--unsafe' ] # for mkdocs.yml
- id: detect-private-key

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.18
hooks:
- id: uv-lock
- id: uv-sync
args: [ --locked, --all-groups ]
stages: [ pre-commit, post-checkout, post-merge, post-rewrite ]

- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
Expand All @@ -48,7 +56,7 @@ repos:
- tomli

- repo: https://github.com/commitizen-tools/commitizen
rev: v4.10.0 # automatically updated by Commitizen
rev: v4.11.0 # automatically updated by Commitizen
hooks:
- id: commitizen
- id: commitizen-branch
Expand All @@ -63,15 +71,15 @@ repos:
- repo: local
hooks:
- id: format
name: Format Python code via Poetry
name: Format Python code
language: system
pass_filenames: false
entry: poetry format
entry: uv run poe format
types: [ python ]

- id: linter and test
name: Linters via Poetry
name: Linters
language: system
pass_filenames: false
entry: poetry lint
entry: uv run poe lint
types: [ python ]
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## v4.11.0 (2025-12-29)

### Feat

- Drop support for Python 3.9 as EOL reached and add Python 3.14 support
- add custom validation

## v4.10.1 (2025-12-11)

### Fix

- **version**: fix the behavior of cz version --major
- **cli**: debug and no_raise can be used together in sys.excepthook
- **git**: replace lstrip with strip for compatibility issue
- **bump**: remove NotAllowed related to --get-next option, other related refactoring

### Refactor

- **version**: rename class member to align with other classes
- **cargo_provider**: cleanup and get rid of potential type errors
- **bump**: extract option validation and new version resolution to new functions
- **changelog**: raise NotAllow when file_name not passed instead of using assert
- **bump**: rename parameter and variables

### Perf

- **ruff**: enable ruff rules TC001~TC006
- add TYPE_CHECKING to CzQuestion imports

## v4.10.0 (2025-11-10)

### Feat
Expand Down
2 changes: 1 addition & 1 deletion commitizen/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.10.0"
__version__ = "4.11.0"
15 changes: 9 additions & 6 deletions commitizen/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
import os
import re
from collections import OrderedDict
from collections.abc import Generator, Iterable
from glob import iglob
from logging import getLogger
from string import Template
from typing import cast
from typing import TYPE_CHECKING, cast

from commitizen.defaults import BUMP_MESSAGE, MAJOR, MINOR, PATCH
from commitizen.exceptions import CurrentVersionNotFoundError
from commitizen.git import GitCommit, smart_open
from commitizen.version_schemes import Increment, Version

if TYPE_CHECKING:
from collections.abc import Generator, Iterable

from commitizen.version_schemes import Increment, Version

VERSION_TYPES = [None, PATCH, MINOR, MAJOR]

Expand Down Expand Up @@ -56,13 +59,13 @@ def find_increment(
if increment == MAJOR:
break

return cast(Increment, increment)
return cast("Increment", increment)


def update_version_in_files(
current_version: str,
new_version: str,
files: Iterable[str],
version_files: Iterable[str],
*,
check_consistency: bool,
encoding: str,
Expand All @@ -77,7 +80,7 @@ def update_version_in_files(
"""
updated_files = []

for path, pattern in _resolve_files_and_regexes(files, current_version):
for path, pattern in _resolve_files_and_regexes(version_files, current_version):
current_version_found = False
bumped_lines = []

Expand Down
8 changes: 4 additions & 4 deletions commitizen/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import re
from collections import OrderedDict, defaultdict
from collections.abc import Generator, Iterable, Mapping, MutableMapping, Sequence
from dataclasses import dataclass
from datetime import date
from itertools import chain
Expand All @@ -44,13 +43,14 @@
Template,
)

from commitizen.cz.base import ChangelogReleaseHook
from commitizen.exceptions import InvalidConfigurationError, NoCommitsFoundError
from commitizen.git import GitCommit, GitTag
from commitizen.tags import TagRules

if TYPE_CHECKING:
from commitizen.cz.base import MessageBuilderHook
from collections.abc import Generator, Iterable, Mapping, MutableMapping, Sequence

from commitizen.cz.base import ChangelogReleaseHook, MessageBuilderHook
from commitizen.git import GitCommit, GitTag


@dataclass
Expand Down
17 changes: 8 additions & 9 deletions commitizen/changelog_formats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
from __future__ import annotations

import sys
from typing import Callable, ClassVar, Protocol
from importlib import metadata
from typing import TYPE_CHECKING, ClassVar, Protocol

if sys.version_info >= (3, 10):
from importlib import metadata
else:
import importlib_metadata as metadata

from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig
from commitizen.exceptions import ChangelogFormatUnknown

if TYPE_CHECKING:
from collections.abc import Callable

from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig

CHANGELOG_FORMAT_ENTRYPOINT = "commitizen.changelog_format"
TEMPLATE_EXTENSION = "j2"

Expand Down
6 changes: 4 additions & 2 deletions commitizen/changelog_formats/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

import os
from abc import ABCMeta
from typing import IO, Any, ClassVar
from typing import IO, TYPE_CHECKING, Any, ClassVar

from commitizen.changelog import Metadata
from commitizen.config.base_config import BaseConfig
from commitizen.tags import TagRules, VersionTag
from commitizen.version_schemes import get_version_scheme

from . import ChangelogFormat

if TYPE_CHECKING:
from commitizen.config.base_config import BaseConfig


class BaseFormat(ChangelogFormat, metaclass=ABCMeta):
"""
Expand Down
Loading