Skip to content

Commit f91f2ac

Browse files
authored
Merge branch 'master' into feature/single-number-version
2 parents 80950cd + aa82b98 commit f91f2ac

File tree

116 files changed

+5310
-4474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+5310
-4474
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please fill in the following content to let us know better about this change.
1414
### Code Changes
1515

1616
- [ ] Add test cases to all the changes you introduce
17-
- [ ] Run `poetry all` locally to ensure this change passes linter check and tests
17+
- [ ] Run `uv run poe all` locally to ensure this change passes linter check and tests
1818
- [ ] Manually test the changes:
1919
- [ ] Verify the feature/bug fix works as expected in real-world scenarios
2020
- [ ] Test edge cases and error conditions
@@ -24,10 +24,10 @@ Please fill in the following content to let us know better about this change.
2424

2525
### Documentation Changes
2626

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

30-
> When running `poetry doc`, any broken internal documentation links will be reported in the console output like this:
30+
> When running `uv run poe doc`, any broken internal documentation links will be reported in the console output like this:
3131
>
3232
> ```text
3333
> 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'.

.github/workflows/docspublish.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@ jobs:
1515
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
1616
fetch-depth: 0
1717
- name: Set up Python
18-
uses: actions/setup-python@v6
19-
with:
20-
python-version: "3.x"
18+
uses: astral-sh/setup-uv@v7
2119
- name: Install dependencies
2220
run: |
23-
python -m pip install -U pip poetry poethepoet
24-
poetry --version
25-
poetry install --only main,script
21+
uv --version
22+
uv sync --frozen --group base --group script
2623
- name: Update CLI screenshots
2724
run: |
28-
poetry doc:screenshots
25+
uv run --no-sync poe doc:screenshots
2926
- name: Commit and push updated CLI screenshots
3027
run: |
3128
git config --global user.name "github-actions[bot]"
@@ -51,14 +48,11 @@ jobs:
5148
run: |
5249
git pull origin master
5350
- name: Set up Python
54-
uses: actions/setup-python@v6
55-
with:
56-
python-version: "3.x"
51+
uses: astral-sh/setup-uv@v7
5752
- name: Install dependencies
5853
run: |
59-
python -m pip install -U pip poetry poethepoet
60-
poetry --version
61-
poetry install --no-root --only documentation
54+
uv --version
55+
uv sync --frozen --only-group base --only-group documentation
6256
- name: Generate Sponsors 💖
6357
uses: JamesIves/github-sponsors-readme-action@v1
6458
with:
@@ -69,7 +63,7 @@ jobs:
6963
env:
7064
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7165
run: |
72-
poetry doc:build
66+
uv run --no-sync poe doc:build
7367
- name: Deploy 🚀
7468
uses: JamesIves/github-pages-deploy-action@v4
7569
with:

.github/workflows/homebrewpublish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v6
1616
- name: Set up Python
17-
uses: actions/setup-python@v6
18-
with:
19-
python-version: "3.x"
17+
uses: astral-sh/setup-uv@v7
2018
- name: Install dependencies
21-
run: |
22-
python -m pip install -U commitizen
19+
run: uv pip install -U commitizen
2320
- name: Set Project version env variable
2421
run: |
2522
echo "project_version=$(cz version --project)" >> $GITHUB_ENV

.github/workflows/links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
check-links:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
issues: write # required for peter-evans/create-issue-from-file
14+
issues: write # required for Broken Links Report
1515
steps:
1616
- uses: actions/checkout@v6
1717

.github/workflows/pythonpackage.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,63 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
detect_changes:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
relevant: ${{ steps.filter.outputs.relevant }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 0
19+
- id: filter
20+
uses: dorny/paths-filter@v3
21+
with:
22+
filters: |
23+
relevant:
24+
- "commitizen/**"
25+
- "tests/**"
26+
- ".github/workflows/**"
1127
python-check:
28+
needs: detect_changes
1229
strategy:
1330
matrix:
1431
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1532
platform: [ubuntu-22.04, macos-latest, windows-latest]
1633
runs-on: ${{ matrix.platform }}
1734
steps:
35+
- name: No relevant changes, fast-path success
36+
if: ${{ needs.detect_changes.outputs.relevant != 'true' }}
37+
run: |
38+
echo "No relevant file changes; skipping tests and linters."
1839
- uses: actions/checkout@v6
40+
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
1941
with:
2042
fetch-depth: 0
2143
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v6
44+
uses: astral-sh/setup-uv@v7
45+
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
2346
with:
2447
python-version: ${{ matrix.python-version }}
2548
- name: Install dependencies
49+
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
2650
run: |
27-
python -m pip install -U pip poetry poethepoet
28-
poetry --version
29-
poetry install --only main,linters,test
51+
uv --version
52+
uv sync --frozen --group base --group test --group linters
3053
- name: Run tests and linters
54+
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
3155
run: |
3256
git config --global user.email "action@github.com"
3357
git config --global user.name "GitHub Action"
34-
poetry ci
58+
uv run --no-sync poe ci
3559
shell: bash
3660
- name: Upload coverage to Codecov
3761
uses: codecov/codecov-action@v5
62+
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
3863
with:
3964
token: ${{ secrets.CODECOV_TOKEN }}
4065
- name: Upload test results to Codecov
4166
uses: codecov/codecov-action@v5
42-
if: ${{ !cancelled() }}
67+
if: ${{ needs.detect_changes.outputs.relevant == 'true' && !cancelled() }}
4368
with:
4469
token: ${{ secrets.CODECOV_TOKEN }}
4570
report_type: test_results

.github/workflows/pythonpublish.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
1114
steps:
1215
- uses: actions/checkout@v6
1316
with:
1417
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
1518
fetch-depth: 0
1619
- name: Set up Python
17-
uses: actions/setup-python@v6
18-
with:
19-
python-version: "3.x"
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install -U pip poetry
23-
poetry --version
24-
- name: Publish
25-
env:
26-
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
27-
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28-
run: poetry publish --build
20+
uses: astral-sh/setup-uv@v7
21+
- name: Build
22+
run: uv build
23+
- name: Publish package to PyPI
24+
uses: pypa/gh-action-pypi-publish@release/v1

.pre-commit-config.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ repos:
2929
args: [ '--unsafe' ] # for mkdocs.yml
3030
- id: detect-private-key
3131

32+
- repo: https://github.com/astral-sh/uv-pre-commit
33+
rev: 0.9.18
34+
hooks:
35+
- id: uv-lock
36+
- id: uv-sync
37+
args: [ --frozen, --all-groups ]
38+
stages: [ pre-commit, post-checkout, post-merge, post-rewrite ]
39+
3240
- repo: https://github.com/asottile/blacken-docs
3341
rev: 1.19.1
3442
hooks:
@@ -48,7 +56,7 @@ repos:
4856
- tomli
4957

5058
- repo: https://github.com/commitizen-tools/commitizen
51-
rev: v4.11.0 # automatically updated by Commitizen
59+
rev: v4.11.3 # automatically updated by Commitizen
5260
hooks:
5361
- id: commitizen
5462
- id: commitizen-branch
@@ -63,15 +71,15 @@ repos:
6371
- repo: local
6472
hooks:
6573
- id: format
66-
name: Format Python code via Poetry
74+
name: Format Python code
6775
language: system
6876
pass_filenames: false
69-
entry: poetry format
77+
entry: uv run --no-sync poe format
7078
types: [ python ]
7179

7280
- id: linter and test
73-
name: Linters via Poetry
81+
name: Linters
7482
language: system
7583
pass_filenames: false
76-
entry: poetry lint
84+
entry: uv run --no-sync poe lint
7785
types: [ python ]

AGENTS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# AGENTS instructions
2+
3+
## Purpose
4+
5+
This file provides **project-specific guidance for AI agents** (and other automated tools) working on the `commitizen` repository.
6+
Follow these instructions in addition to any higher-level system or tool rules.
7+
8+
## Project Overview
9+
10+
- **Project**: `commitizen` - a tool to help enforce and automate conventional commits, version bumps, and changelog generation.
11+
- **Primary language**: Python (library + CLI).
12+
- **Key entrypoints**:
13+
- `commitizen/cli.py` - main CLI implementation.
14+
- `commitizen/commands/` - subcommands such as `bump`, `commit`, `changelog`, `check`, etc.
15+
- `commitizen/config/` - configuration discovery and loading.
16+
- `commitizen/providers/` - version providers (e.g., `pep621`, `poetry`, `npm`, `uv`).
17+
18+
## General Expectations
19+
20+
- **Preserve public behavior and CLI UX.**
21+
- **Avoid breaking changes** (APIs, CLI flags, exit codes) unless explicitly requested.
22+
- **Keep changes small and focused.**
23+
- **Update or add tests/docs** when you change user-facing behavior.
24+
25+
## How to Explore and Validate Changes
26+
27+
- **Code entrypoints**:
28+
- CLI behavior: `commitizen/cli.py` and `commitizen/commands/`.
29+
- Config resolution: `commitizen/config/factory.py` and config modules.
30+
- Bump/changelog/versioning: `commitizen/bump.py`, `commitizen/changelog.py`, `commitizen/version_schemes.py`, `commitizen/providers/`.
31+
- **Docs to consult** (before larger changes):
32+
- `docs/README.md`
33+
- `docs/contributing.md`
34+
- `docs/commands/` and `docs/config/`
35+
- **Tests**:
36+
- Prefer targeted runs, e.g. `uv run pytest tests/test_cli.py` or a specific `tests/commands/` file.
37+
38+
## Coding Guidelines (for AI tools)
39+
40+
- **Style**: Follow patterns in nearby code; keep functions focused.
41+
- **Types**: Preserve or improve existing type hints.
42+
- **Errors**: Prefer `commitizen/exceptions.py` error types; keep messages clear for CLI users.
43+
- **Output**: Use `commitizen/out.py`; do not add noisy logging.
44+
45+
## Common Task Pointers
46+
47+
- **CLI commands**: edit `commitizen/commands/<name>.py`, wire via `commitizen/cli.py`, and adjust `tests/commands/` + `docs/commands/`.
48+
- **Version bumps / changelog**: use `commitizen/bump.py`, `commitizen/changelog.py`, `commitizen/version_schemes.py`, and `commitizen/providers/` (+ matching tests).
49+
- **Config resolution**: use `commitizen/config/factory.py` and config modules; update `tests/test_conf.py` and related tests.
50+
51+
## When Unsure
52+
53+
- Prefer **reading tests and documentation first** to understand the expected behavior.
54+
- When behavior is ambiguous, **assume backward compatibility** with current tests and docs is required.

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## v4.11.3 (2026-01-13)
2+
3+
### Fix
4+
5+
- **bump**: fix the issue that changelog_merge_prerelease not working on cz bump
6+
7+
## v4.11.2 (2026-01-12)
8+
9+
### Fix
10+
11+
- **config**: add warning for multiple configuration files and update documentation (#1773)
12+
13+
## v4.11.1 (2026-01-03)
14+
15+
### Fix
16+
17+
- **providers**: normalize package names in uv provider for uv.lock matching
18+
119
## v4.11.0 (2025-12-29)
220

321
### Feat

commitizen/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.11.0"
1+
__version__ = "4.11.3"

0 commit comments

Comments
 (0)