Skip to content

Commit 1cd2714

Browse files
committed
feat: add commitizen to help standardize commits and generate changelogs
1 parent 7ba6f43 commit 1cd2714

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@ RUN \
99
&& pipx uninstall flake8 \
1010
&& pipx uninstall black
1111

12+
RUN pipx install commitizen
13+
14+
RUN umask 0002 \
15+
&& mkdir -p ${PIPX_BIN_DIR} \
16+
&& chown -R "vscode:pipx" ${PIPX_HOME} \
17+
&& chmod -R g+r+w "${PIPX_HOME}"
18+
1219
ENV SHELL /bin/bash

.pre-commit-config.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55
exclude: ^\.vscode/.*$
66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
8+
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
99
hooks:
1010
- id: trailing-whitespace
1111
args: ['--markdown-linebreak-ext=md,markdown']
@@ -36,7 +36,7 @@ repos:
3636
args:
3737
- --remove
3838
- repo: https://github.com/psf/black
39-
rev: 6fdf8a4af28071ed1d079c01122b34c5d587207a # frozen: 24.2.0
39+
rev: 3702ba224ecffbcec30af640c149f231d90aebdb # frozen: 24.4.2
4040
hooks:
4141
- id: black
4242
- repo: https://github.com/pycqa/isort
@@ -49,7 +49,7 @@ repos:
4949
- id: python-no-eval
5050
- id: python-no-log-warn
5151
- repo: https://github.com/asottile/pyupgrade
52-
rev: df17dfa3911b81b4a27190b0eea5b1debc7ffa0a # frozen: v3.15.1
52+
rev: 12af25eb252deaaecb6b259df40d01f42e716dc3 # frozen: v3.15.2
5353
hooks:
5454
- id: pyupgrade
5555
args:
@@ -85,3 +85,7 @@ repos:
8585
- '120'
8686
- -e
8787
- -p
88+
- repo: https://github.com/commitizen-tools/commitizen
89+
rev: a754230d41a1933fd4ba000014d841dd2a05c71d # frozen: v3.24.0
90+
hooks:
91+
- id: commitizen

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,11 @@ warn_redundant_casts = true
113113
module = 'cloudbot.*'
114114
check_untyped_defs = true
115115
warn_return_any = true
116+
117+
[tool.commitizen]
118+
name = "cz_conventional_commits"
119+
tag_format = "v$version"
120+
version_scheme = "semver"
121+
version_provider = "scm"
122+
update_changelog_on_bump = true
123+
major_version_zero = true

0 commit comments

Comments
 (0)