Skip to content

Commit 74d92d2

Browse files
committed
ci(pyproject.toml): strict check for invalid commit messages
1 parent 47beadc commit 74d92d2

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

pyproject.toml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ lint.sequence = [
237237
{ cmd = "mypy commitizen/ tests/" },
238238
]
239239

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

243243
test.help = "Run the test suite"
244244
test.cmd = "pytest -n 3 --dist=loadfile"
@@ -250,12 +250,7 @@ cover.help = "Run the test suite with coverage"
250250
cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen"
251251

252252
all.help = "Run all tasks"
253-
all.sequence = [
254-
"format",
255-
"lint",
256-
"cover",
257-
"check-commit",
258-
]
253+
all.sequence = ["check-commit", "format", "lint", "cover"]
259254

260255
"doc:screenshots".help = "Render documentation screenshots"
261256
"doc:screenshots".script = "scripts.gen_cli_help_screenshots:gen_cli_help_screenshots"
@@ -267,10 +262,7 @@ doc.help = "Live documentation server"
267262
doc.cmd = "mkdocs serve"
268263

269264
ci.help = "Run all tasks in CI"
270-
ci.sequence = [
271-
{ cmd = "pre-commit run --all-files" },
272-
"cover",
273-
]
265+
ci.sequence = ["check-commit", { cmd = "pre-commit run --all-files" }, "cover"]
274266
ci.env = { SKIP = "no-commit-to-branch" }
275267

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

0 commit comments

Comments
 (0)