Skip to content

Commit baf9406

Browse files
committed
ci(pyproject.toml): strict check for invalid commit messages
1 parent d968f26 commit baf9406

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ lint.sequence = [
249249
{ cmd = "mypy" },
250250
]
251251

252-
check-commit.help = "Check the commit message"
253-
check-commit.cmd = "cz -nr 3 check --rev-range origin/master.."
252+
check-commit.help = "Check the commit messages"
253+
check-commit.cmd = "poetry run cz --no-raise 3 check --rev-range origin/master.."
254254

255255
test.help = "Run the test suite"
256256
test.cmd = "pytest -n 3 --dist=loadfile"
@@ -262,7 +262,7 @@ cover.help = "Run the test suite with coverage"
262262
cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen"
263263

264264
all.help = "Run all tasks"
265-
all.sequence = ["format", "lint", "cover", "check-commit"]
265+
all.sequence = ["check-commit", "format", "lint", "cover"]
266266

267267
"doc:screenshots".help = "Render documentation screenshots"
268268
"doc:screenshots".script = "scripts.gen_cli_help_screenshots:gen_cli_help_screenshots"
@@ -274,7 +274,7 @@ doc.help = "Live documentation server"
274274
doc.cmd = "mkdocs serve"
275275

276276
ci.help = "Run all tasks in CI"
277-
ci.sequence = [{ cmd = "pre-commit run --all-files" }, "cover"]
277+
ci.sequence = ["check-commit", { cmd = "pre-commit run --all-files" }, "cover"]
278278
ci.env = { SKIP = "no-commit-to-branch" }
279279

280280
setup-pre-commit.help = "Install pre-commit hooks"

0 commit comments

Comments
 (0)