Skip to content

Commit

Permalink
Merge pull request #8 from CodeChenL/main
Browse files Browse the repository at this point in the history
feat: add pre-commit check commitizen
  • Loading branch information
RadxaYuntian authored Feb 27, 2024
2 parents d75711e + b1f699a commit 81be737
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tool.commitizen]
name = "cz_customize"

[tool.commitizen.customize]
schema_pattern = "(?s)(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\\(\\S+\\))?!?:(?!.*\\b(?:update|Update)\\b)[^\\n\\r]+((\\n\\n.*)|(\\s*))?$"
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
default_install_hook_types:
- commit-msg
- pre-commit
- pre-push

repos:
- repo: https://github.com/detailyang/pre-commit-shell
rev: v1.0.6
Expand All @@ -8,6 +13,8 @@ repos:
rev: v3.0.3
hooks:
- id: prettier
stages:
- pre-commit
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -28,3 +35,13 @@ repos:
rev: v3.0.3
hooks:
- id: prettier
stages:
- pre-commit
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.15.0
hooks:
- id: commitizen
- id: commitizen-branch
args: [--rev-range, $PRE_COMMIT_FROM_REF..$PRE_COMMIT_TO_REF]
stages:
- pre-push

0 comments on commit 81be737

Please sign in to comment.