Skip to content

Commit 7a8ac42

Browse files
Merge branch 'master' into v4-11-0
2 parents b5636b9 + 8c57f63 commit 7a8ac42

File tree

9 files changed

+77
-22
lines changed

9 files changed

+77
-22
lines changed

.github/workflows/links.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Links
2+
3+
on:
4+
repository_dispatch:
5+
workflow_dispatch:
6+
pull_request:
7+
schedule:
8+
- cron: "00 18 * * *"
9+
10+
jobs:
11+
check-links:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write # required for peter-evans/create-issue-from-file
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Link Checker
19+
id: lychee
20+
uses: lycheeverse/lychee-action@v2
21+
with:
22+
fail: false
23+
24+
- name: Broken Links Report
25+
if: steps.lychee.outputs.exit_code != 0 && github.event_name == 'schedule'
26+
uses: actions/github-script@v8
27+
with:
28+
script: |
29+
const fs = require('fs');
30+
31+
// Read the markdown file
32+
// Ensure the path is correct relative to the workspace root
33+
const reportBody = fs.readFileSync('./lychee/out.md', 'utf8');
34+
35+
await github.rest.issues.create({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
title: 'Broken Links Report',
39+
body: reportBody
40+
});

docs/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/commitizen-tools/commitizen/pythonpackage.yml?label=python%20package&logo=github&logoColor=white&style=flat-square)](https://github.com/commitizen-tools/commitizen/actions)
2+
[![Check Links](https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml/badge.svg)](https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml)
23
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
34
[![PyPI Package latest release](https://img.shields.io/pypi/v/commitizen.svg?style=flat-square)](https://pypi.org/project/commitizen/)
45
[![PyPI Package download count (per month)](https://img.shields.io/pypi/dm/commitizen?style=flat-square)](https://pypi.org/project/commitizen/)
@@ -45,7 +46,7 @@ This standardization makes your commit history more readable and meaningful, whi
4546
- Intelligent [version bumping](https://commitizen-tools.github.io/commitizen/commands/bump/) using [Semantic Versioning][semver]
4647
- Automatic [keep a changelog][keepchangelog] generation
4748
- Built-in commit validation with pre-commit hooks
48-
- [Customizable](https://commitizen-tools.github.io/commitizen/customization/) commit rules and templates
49+
- [Customizable](https://commitizen-tools.github.io/commitizen/customization/config_file/) commit rules and templates
4950
- Multi-format version file support
5051
- Custom rules and plugins via pip
5152

@@ -174,7 +175,7 @@ You can customize:
174175

175176
- [Version files](https://commitizen-tools.github.io/commitizen/commands/bump/#version_files)
176177
- [Version scheme](https://commitizen-tools.github.io/commitizen/commands/bump/#version_scheme)
177-
- [Version provider](https://commitizen-tools.github.io/commitizen/config/#version-providers)
178+
- [Version provider](https://commitizen-tools.github.io/commitizen/config/version_provider/)
178179

179180
For all available options, see the [bump command documentation](https://commitizen-tools.github.io/commitizen/commands/bump/).
180181

@@ -249,7 +250,7 @@ Commitizen provides a comprehensive CLI with various commands. Here's the comple
249250
250251
- [Conventional Commits Specification][conventional_commits]
251252
- [Exit Codes Reference](https://commitizen-tools.github.io/commitizen/exit_codes/)
252-
- [Configuration Guide](https://commitizen-tools.github.io/commitizen/config/)
253+
- [Configuration Guide](https://commitizen-tools.github.io/commitizen/config/configuration_file/)
253254
- [Command Documentation](https://commitizen-tools.github.io/commitizen/commands/init/)
254255
255256
### Getting Help

docs/config/bump.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -185,24 +185,24 @@ version_files = [
185185

186186
```json title="setup.json"
187187
{
188-
"name": "magictool",
189-
"version": "1.2.3",
190-
"dependencies": {
191-
"lodash": "1.2.3"
192-
}
188+
"name": "magictool",
189+
"version": "1.2.3",
190+
"dependencies": {
191+
"lodash": "1.2.3"
192+
}
193193
}
194194
```
195195

196196
After running `cz bump 2.0.0`, its content will be updated to:
197197

198198
```diff title="setup.json"
199199
{
200-
"name": "magictool",
201-
- "version": "1.2.3",
202-
+ "version": "2.0.0",
203-
"dependencies": {
204-
"lodash": "1.2.3"
205-
}
200+
"name": "magictool",
201+
- "version": "1.2.3",
202+
+ "version": "2.0.0",
203+
"dependencies": {
204+
"lodash": "1.2.3"
205+
}
206206
}
207207
```
208208

docs/config/version_provider.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Commitizen includes several built-in version providers for common package manage
1919
The default version provider stores and retrieves the version from your Commitizen configuration file (e.g., `pyproject.toml`, `.cz.toml`, etc.).
2020

2121
**Use when:**
22+
2223
- You want to keep version management separate from your package manager
2324
- Your project doesn't use a standard package manager
2425
- You need maximum flexibility in version management
@@ -35,6 +36,7 @@ version = "0.1.0" # Required when using this provider
3536
Fetches the version from Git tags using `git describe`. This provider **only reads** version information and never writes it back to files. It's designed to work with tools like `setuptools-scm` or other package manager `*-scm` plugins that derive version numbers from Git history.
3637

3738
**Use when:**
39+
3840
- You're using `setuptools-scm` or similar tools
3941
- You want version numbers derived from Git tags
4042
- You don't want Commitizen to modify any files for version management
@@ -54,6 +56,7 @@ version_provider = "scm"
5456
Manages version in `pyproject.toml` under the `project.version` field, following [PEP 621](https://peps.python.org/pep-0621/) standards.
5557

5658
**Use when:**
59+
5760
- You're using a modern Python project with PEP 621-compliant `pyproject.toml`
5861
- You want version management integrated with your Python project metadata
5962

@@ -75,6 +78,7 @@ version = "0.1.0" # Managed by Commitizen
7578
Manages version in `pyproject.toml` under the `tool.poetry.version` field, which is used by the [Poetry](https://python-poetry.org/) package manager. This approach is recommended only for users running Poetry versions earlier than 2.0 or relying on Poetry-specific features. For most users on Poetry 2.0 or later, it is recommended to use `pep621` instead. [Read More](https://python-poetry.org/docs/main/managing-dependencies/)
7679

7780
**Use when:**
81+
7882
- You're using Poetry < 2.0 as your Python package manager
7983
- You're using Poetry >= 2.0 as your Python package manager, but don't need poetry-specific features
8084
- You want Commitizen to manage the version that Poetry uses
@@ -101,6 +105,7 @@ Manages version in both `pyproject.toml` (`project.version`) and `uv.lock` (`pac
101105
Even though uv follows PEP 621 format, `pep621` does not manage the version in `uv.lock`. `uv` is still suggested for uv users.
102106

103107
**Use when:**
108+
104109
- You're using `uv` as your Python package manager
105110
- You want version synchronization between `pyproject.toml` and `uv.lock`
106111

@@ -115,6 +120,7 @@ version_provider = "uv"
115120
Manages version in both `Cargo.toml` (`package.version`) and `Cargo.lock` (`package.version` for the matching package name). This ensures consistency between your Rust project's manifest and lock file.
116121

117122
**Use when:**
123+
118124
- You're working with a Rust project using Cargo
119125
- You want Commitizen to manage Rust package versions
120126

@@ -136,6 +142,7 @@ version = "0.1.0" # Managed by Commitizen
136142
Manages version in `package.json` and optionally synchronizes with `package-lock.json` and `npm-shrinkwrap.json` if they exist.
137143

138144
**Use when:**
145+
139146
- You're working with a Node.js/JavaScript project
140147
- You want Commitizen to manage npm package versions
141148

@@ -158,6 +165,7 @@ version_provider = "npm"
158165
Manages version in `composer.json` under the `version` field, used by PHP's Composer package manager.
159166

160167
**Use when:**
168+
161169
- You're working with a PHP project using Composer
162170
- You want Commitizen to manage Composer package versions
163171

docs/external_links.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
- [Python Table Manners - Commitizen: 規格化 commit message](https://blog.wei-lee.me/posts/tech/2020/03/python-table-manners-commitizen/) (Written in Traditional Mandarin)
1515
- [Automating semantic release with commitizen](https://woile.dev/posts/automating-semver-releases-with-commitizen/) (English)
1616
- [How to Write Better Git Commit Messages – A Step-By-Step Guide](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/?utm_source=tldrnewsletter) (English)
17-
- [Continuous delivery made easy (in Python)](https://medium.com/dev-genius/continuous-delivery-made-easy-in-python-c085e9c82e69)
17+
- [Continuous delivery made easy (in Python)](https://blog.devgenius.io/continuous-delivery-made-easy-in-python-c085e9c82e69)
1818

1919
[automatizando]: https://youtu.be/t3aE2M8UPBo

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ If you would like to learn more about both schemes, there are plenty of good res
120120
- [API Versioning from Stripe](https://stripe.com/blog/api-versioning)
121121
- [Discussion about pip's use of CalVer](https://github.com/pypa/pip/issues/5645#issuecomment-407192448)
122122
- [Git Version Numbering](https://code.erpenbeck.io/git/2021/12/16/git-version-numbering/)
123-
- [SemVer vs. CalVer and Why I Use Both](https://mikestaszel.com/2021/04/03/semver-vs-calver-and-why-i-use-both/) (but not at the same time)
123+
- [SemVer vs. CalVer and Why I Use Both](https://mikestaszel.com/post/semver-vs-calver-and-why-i-use-both/) (but not at the same time)
124124
- [Semver Will Not Save You](https://hynek.me/articles/semver-will-not-save-you/)
125125
- [Why I Don't Like SemVer](https://snarky.ca/why-i-dont-like-semver/)
126126

docs/tutorials/github_actions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,14 @@ jobs:
113113
poetry install
114114
- name: Build and publish
115115
env:
116-
PYPI_USERNAME: __token__
117-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
118-
run: |
119-
./scripts/publish
116+
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
117+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
118+
run: poetry publish --build
120119
```
121120

122-
Notice that we are using poetry, and we are calling a bash script in `./scripts/publish`. You should configure the action, and publish with your tools (twine, poetry, etc.). Check [Commitizen example](https://github.com/commitizen-tools/commitizen/blob/master/scripts/publish)
121+
Notice that we are using poetry to publish the package.
122+
123+
123124
You can also use [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) to publish your package.
124125

125126
Push the changes and that's it.

docs/tutorials/writing_commits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ Emojis may be added as well (e.g., see [cz-emoji][cz_emoji]), which requires the
4646

4747
[customization]: ../customization/config_file.md
4848
[conventional_commits]: https://www.conventionalcommits.org
49-
[cz_emoji]: https://commitizen-tools.github.io/commitizen/third-party-commitizen/#cz-emoji
49+
[cz_emoji]: https://commitizen-tools.github.io/commitizen/third-party-plugins/cz-emoji/
5050
[configuration]: ../config/commit.md#encoding
5151
[breaking-change-config]: ../config/commit.md#breaking_change_exclamation_in_title

lychee.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
exclude_path = ["./tests"]
2+
3+
exclude = [
4+
"https://blog.devgenius.io/continuous-delivery-made-easy-in-python-c085e9c82e69" # Membership only article, sometimes it's 403 forbidden
5+
]

0 commit comments

Comments
 (0)