pre-commit-crocodile 7.0.0__tar.gz → 8.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.gitlab-ci.yml +0 -1
  2. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.pre-commit-config.yaml +3 -3
  3. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/CHANGELOG.md +38 -0
  4. {pre_commit_crocodile-7.0.0/pre_commit_crocodile.egg-info → pre_commit_crocodile-8.0.0}/PKG-INFO +22 -4
  5. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/README.md +21 -3
  6. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/commits/Dockerfile +1 -1
  7. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/components.md +1 -0
  8. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/hooks.md +1 -0
  9. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0/pre_commit_crocodile.egg-info}/PKG-INFO +22 -4
  10. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/pre_commit_crocodile.egg-info/SOURCES.txt +1 -1
  11. pre_commit_crocodile-8.0.0/requirements/commits.txt +4 -0
  12. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/pages.txt +1 -1
  13. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/quality.txt +1 -1
  14. pre_commit_crocodile-7.0.0/src/assets/.pre-commit-config.yaml → pre_commit_crocodile-8.0.0/src/assets/.pre-commit-config.template.yaml +3 -3
  15. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/assets/commits.yml +13 -4
  16. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/cli/entrypoint.py +125 -35
  17. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/cli/main.py +6 -0
  18. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/commitizen.py +1 -1
  19. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/gcil.py +1 -1
  20. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/precommit.py +11 -10
  21. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/package/bundle.py +4 -2
  22. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/templates/commits.yml +13 -4
  23. pre_commit_crocodile-7.0.0/requirements/commits.txt +0 -4
  24. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.coveragerc +0 -0
  25. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.cz.yaml +0 -0
  26. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.gitattributes +0 -0
  27. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.gitignore +0 -0
  28. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.gitmodules +0 -0
  29. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.markdownlint.json +0 -0
  30. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.pre-commit-hooks.yaml +0 -0
  31. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.style.yapf +0 -0
  32. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.vscode/extensions.json +0 -0
  33. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/.vscode/settings.json +0 -0
  34. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/LICENSE +0 -0
  35. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/config/cliff.toml +0 -0
  36. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/build/Dockerfile +0 -0
  37. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/codestyle/Dockerfile +0 -0
  38. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/deploy/Dockerfile +0 -0
  39. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/pages/Dockerfile +0 -0
  40. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/preview/Dockerfile +0 -0
  41. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/rehost/images.txt +0 -0
  42. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/test-coverage-linux/Dockerfile +0 -0
  43. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/test-coverage-windows/Dockerfile +0 -0
  44. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/containers/test-linux/Dockerfile +0 -0
  45. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/.pages.in +0 -0
  46. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/assets/images/favicon.png +0 -0
  47. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/assets/scripts/mkdocs-exporter.js +0 -0
  48. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/assets/stylesheets/custom.css +0 -0
  49. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/assets/stylesheets/pdf.scss +0 -0
  50. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/commitizen.md +0 -0
  51. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/commits.md +0 -0
  52. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/pre-commit.md +0 -0
  53. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/prepare.sh +0 -0
  54. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/preview.py +0 -0
  55. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/preview.svg +0 -0
  56. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/robots.txt +0 -0
  57. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/settings.md +0 -0
  58. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/template.svg +0 -0
  59. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/templates/covers/back.html.j2 +0 -0
  60. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/docs/templates/covers/front.html.j2 +0 -0
  61. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/mkdocs.yml +0 -0
  62. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/mypy.ini +0 -0
  63. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/pre_commit_crocodile.egg-info/dependency_links.txt +0 -0
  64. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/pre_commit_crocodile.egg-info/entry_points.txt +0 -0
  65. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/pre_commit_crocodile.egg-info/requires.txt +0 -0
  66. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/pre_commit_crocodile.egg-info/top_level.txt +0 -0
  67. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/build.txt +0 -0
  68. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/coverage.txt +0 -0
  69. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/deploy.txt +0 -0
  70. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/docs.txt +0 -0
  71. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/runtime.txt +0 -0
  72. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/requirements/tests.txt +0 -0
  73. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/setup.cfg +0 -0
  74. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/setup.py +0 -0
  75. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/sonar-project.properties +0 -0
  76. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/__init__.py +0 -0
  77. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/__main__.py +0 -0
  78. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/assets/.cz.yaml +0 -0
  79. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/assets/__init__.py +0 -0
  80. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/cli/__init__.py +0 -0
  81. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/__init__.py +0 -0
  82. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/argcomplete.py +0 -0
  83. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/git.py +0 -0
  84. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/prek.py +0 -0
  85. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/radiandevcore.py +0 -0
  86. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/readme.py +0 -0
  87. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/features/templates.py +0 -0
  88. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/hooks/__init__.py +0 -0
  89. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/hooks/check_commitizen_branch.py +0 -0
  90. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/hooks/check_yaml_ruamel_pure.py +0 -0
  91. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/hooks/configurations.py +0 -0
  92. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/hooks/prepare_commit_message.py +0 -0
  93. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/package/__init__.py +0 -0
  94. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/package/settings.py +0 -0
  95. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/package/updates.py +0 -0
  96. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/package/version.py +0 -0
  97. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/prints/__init__.py +0 -0
  98. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/prints/boxes.py +0 -0
  99. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/prints/colors.py +0 -0
  100. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/system/__init__.py +0 -0
  101. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/system/commands.py +0 -0
  102. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/system/platform.py +0 -0
  103. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/types/__init__.py +0 -0
  104. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/types/environments.py +0 -0
  105. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/src/types/strings.py +0 -0
  106. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/arguments/test.sh +0 -0
  107. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/colors/test.sh +0 -0
  108. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/macos/test.sh +0 -0
  109. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/settings/test.sh +0 -0
  110. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/versions/test.sh +0 -0
  111. {pre_commit_crocodile-7.0.0 → pre_commit_crocodile-8.0.0}/tests/windows/test.sh +0 -0
@@ -2,7 +2,6 @@ include:
2
2
  - component: gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@$CI_COMMIT_SHA
3
3
  inputs:
4
4
  stage: prepare
5
- pre_commit: prek
6
5
  - project: RadianDevCore/gitlab-ci/components
7
6
  file: /templates/clean.yml
8
7
  ref: main
@@ -10,7 +10,7 @@ default_stages:
10
10
  - pre-push
11
11
  - prepare-commit-msg
12
12
  minimum_pre_commit_version: 3.8.0
13
- minimum_prek_version: 0.0.25
13
+ minimum_prek_version: 0.2.0
14
14
 
15
15
  # pre-commit exclusions
16
16
  exclude: >
@@ -78,7 +78,7 @@ repos:
78
78
 
79
79
  # Repository: commitizen
80
80
  - repo: https://github.com/commitizen-tools/commitizen
81
- rev: v4.8.3
81
+ rev: v4.9.1
82
82
  hooks:
83
83
  - id: commitizen
84
84
  stages:
@@ -118,7 +118,7 @@ repos:
118
118
 
119
119
  # Repository: gcil
120
120
  - repo: https://gitlab.com/RadianDevCore/tools/gcil
121
- rev: 13.0.0
121
+ rev: 13.0.1
122
122
  hooks:
123
123
  - id: run-gcil-push
124
124
  name: Run GitLab CI job with gcil (codestyle)
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ <a name="8.0.0"></a>
4
+ ## [8.0.0](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/compare/7.0.0...8.0.0) (2025-09-14)
5
+
6
+ ### ✨ Features
7
+
8
+ - **cli:** implement 'includes: remotes:' support and '--remotes' ([c640cb4](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/c640cb498aa1e9dbf1e7951a601f5ba1cd84f373))
9
+ - **pre-commit-config:** migrate to 'prek' 0.2.0 ([efaec2a](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/efaec2a4d6e3e22dc5d125d9d4b3bc7adb8c3a04))
10
+ - **pre-commit-config:** migrate to 'commitizen' v4.9.1 ([731a152](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/731a1527ae19f7e81b4d30729e7bbd1fcc296cc0))
11
+ - **pre-commit-config:** migrate to 'gcil' 13.0.1 ([0d76eef](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/0d76eefad0fb2d8b47e881404b662bbdd0e103fb))
12
+ - **precommit:** migrate to 'prek auto-update' usage ([9e7da0f](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/9e7da0f6eca3b54526fe6a81703f6728dac5cce9))
13
+ - **precommit:** configure 'prek' as default engine ([e172dd6](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/e172dd68cb290335fdaa4d9a755b24b81e8018d3))
14
+ - **src, requirements:** migrate to 'commitizen' 4.9.1+adriandc.20250914 ([b46a211](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/b46a2118c3bb40d1e72fe5c4d85ffe4c1b91a6db))
15
+
16
+ ### 🐛 Bug Fixes
17
+
18
+ - **assets:** isolate template as '.pre-commit-config.template.yaml' ([4188926](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/4188926227d9949de2bb33d60cee133044b5ee68))
19
+
20
+ ### 📚 Documentation
21
+
22
+ - **components:** document 'include: remote:' syntax usage ([c415801](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/c4158010673de6bc5ca314ae4e5ae4b122c786be))
23
+ - **readme:** document engine settings configuration ([0b88412](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/0b88412285e15fef4585333739db128959ac471d))
24
+ - **readme:** improve documentation to document provided features ([8d4c424](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/8d4c424a8533457f81d218941e6104c7005264e4))
25
+ - **readme:** move 'prek' default engine first ([c9401ea](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/c9401ead05423257830869ac078a2c84a3f3a7cb))
26
+
27
+ ### ⚙️ Cleanups
28
+
29
+ - **assets:** use 'PACKAGE_REVISION' simpler text syntax ([b24ae12](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/b24ae12a6167dff377ed8ce6d7b26a7b7a11ba99))
30
+
31
+ ### 🚀 CI
32
+
33
+ - **commits:** configure 'prek' as default engine ([d07cd24](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/d07cd2478718f6fca5a76106c0e444d9fe59e3da))
34
+ - **commits:** detect duplicated commits titles in checked ranges ([b675527](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/b675527ad8f1624bad2eb5986731b29be7c8a848))
35
+
36
+ ### 📦 Build
37
+
38
+ - **commits:** raise minimal image version to '7' ([57e2fa3](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commit/57e2fa354bbf4bdea8819bb6a2c3557ee4d47072))
39
+
40
+
3
41
  <a name="7.0.0"></a>
4
42
  ## [7.0.0](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/compare/6.2.1...7.0.0) (2025-08-14)
5
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pre-commit-crocodile
3
- Version: 7.0.0
3
+ Version: 8.0.0
4
4
  Summary: Git hooks manager intended for developers using pre-commit, prek and commitizen
5
5
  Home-page: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile
6
6
  Author: Adrian DC
@@ -85,13 +85,20 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
85
85
  - **CLI - [prek](https://github.com/j178/prek):** Better `pre-commit`, re-engineered in Rust
86
86
  - **CLI - [commitizen](https://commitizen-tools.github.io/commitizen/):** Commits tools and validation based upon [conventional commits](https://www.conventionalcommits.org/en/)
87
87
  - **Hooks - [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks):** Common `pre-commit` hooks useful for developers
88
- - **Hooks - `prepare-commit-msg`:** Prepare commit message automatically based on changes
88
+
89
+ **`pre-commit-crocodile` provides the following features:**
90
+
91
+ - **CLI - [pre-commit-crocodile](.):** Management tool for `pre-commit` Git hooks
92
+ - **CLI - [pre-commit-crocodile](.):** Easy Git hooks activation for development teams
93
+ - **CLI - [pre-commit-crocodile](.):** Dependencies preparation for [pre-commit](https://pre-commit.com/) or [prek](https://github.com/j178/prek).
94
+ - **CLI - [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/pre-commit/):** Automated customized configurations for maintainers
95
+ - **Hooks - [prepare-commit-msg](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/hooks/):** Prepare commit message automatically based on changes
89
96
 
90
97
  ---
91
98
 
92
99
  ## Preview
93
100
 
94
- ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/7.0.0/docs/preview.svg)
101
+ ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/8.0.0/docs/preview.svg)
95
102
 
96
103
  ---
97
104
 
@@ -105,7 +112,8 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
105
112
  ```yaml
106
113
  usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
107
114
  [-l | -i | -c | -b | -e | -d | -a | -C | -r] [--config FOLDER | -D] [--commit]
108
- [--components | --no-components] [--offline] [--stage STAGE] [--set-engine [ENGINE]] [--]
115
+ [--components | --remotes | --no-components] [--offline] [--stage STAGE]
116
+ [--set-engine [ENGINE]] [--]
109
117
 
110
118
  pre-commit-crocodile: Git hooks manager intended for developers using pre-commit, prek and commitizen
111
119
 
@@ -135,6 +143,7 @@ configurations arguments:
135
143
  -D, --default # Use global default configurations instead of sources
136
144
  --commit # Commit configurations changes automatically (implies --configure)
137
145
  --components # Import components from GitLab with 'include: component:'
146
+ --remotes # Import components from GitLab with 'include: remote:'
138
147
  --no-components # Import components templates locally instead of 'include: component:'
139
148
  --offline # Use offline mode to disable configurations autoupdate
140
149
  --stage STAGE # Run a specific pre-commit stage with --run
@@ -193,6 +202,15 @@ Projects compatible with `pre-commit-crocodile` can use this badge to ease thing
193
202
 
194
203
  ## Projects with configurations | [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
195
204
 
205
+ ### Configure engine to use (once per user)
206
+
207
+ - **[prek](https://github.com/j178/prek):** Recent Rust re-implementation, in development and faster (default, recommended)
208
+ - **[pre-commit](https://pre-commit.com/):** Original Python implementation, stable but slower (legacy)
209
+
210
+ ```bash
211
+ pre-commit-crocodile --set-engine [pre-commit,prek]
212
+ ```
213
+
196
214
  ### Install dependencies (once per user)
197
215
 
198
216
  ```bash
@@ -35,13 +35,20 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
35
35
  - **CLI - [prek](https://github.com/j178/prek):** Better `pre-commit`, re-engineered in Rust
36
36
  - **CLI - [commitizen](https://commitizen-tools.github.io/commitizen/):** Commits tools and validation based upon [conventional commits](https://www.conventionalcommits.org/en/)
37
37
  - **Hooks - [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks):** Common `pre-commit` hooks useful for developers
38
- - **Hooks - `prepare-commit-msg`:** Prepare commit message automatically based on changes
38
+
39
+ **`pre-commit-crocodile` provides the following features:**
40
+
41
+ - **CLI - [pre-commit-crocodile](.):** Management tool for `pre-commit` Git hooks
42
+ - **CLI - [pre-commit-crocodile](.):** Easy Git hooks activation for development teams
43
+ - **CLI - [pre-commit-crocodile](.):** Dependencies preparation for [pre-commit](https://pre-commit.com/) or [prek](https://github.com/j178/prek).
44
+ - **CLI - [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/pre-commit/):** Automated customized configurations for maintainers
45
+ - **Hooks - [prepare-commit-msg](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/hooks/):** Prepare commit message automatically based on changes
39
46
 
40
47
  ---
41
48
 
42
49
  ## Preview
43
50
 
44
- ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/7.0.0/docs/preview.svg)
51
+ ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/8.0.0/docs/preview.svg)
45
52
 
46
53
  ---
47
54
 
@@ -55,7 +62,8 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
55
62
  ```yaml
56
63
  usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
57
64
  [-l | -i | -c | -b | -e | -d | -a | -C | -r] [--config FOLDER | -D] [--commit]
58
- [--components | --no-components] [--offline] [--stage STAGE] [--set-engine [ENGINE]] [--]
65
+ [--components | --remotes | --no-components] [--offline] [--stage STAGE]
66
+ [--set-engine [ENGINE]] [--]
59
67
 
60
68
  pre-commit-crocodile: Git hooks manager intended for developers using pre-commit, prek and commitizen
61
69
 
@@ -85,6 +93,7 @@ configurations arguments:
85
93
  -D, --default # Use global default configurations instead of sources
86
94
  --commit # Commit configurations changes automatically (implies --configure)
87
95
  --components # Import components from GitLab with 'include: component:'
96
+ --remotes # Import components from GitLab with 'include: remote:'
88
97
  --no-components # Import components templates locally instead of 'include: component:'
89
98
  --offline # Use offline mode to disable configurations autoupdate
90
99
  --stage STAGE # Run a specific pre-commit stage with --run
@@ -143,6 +152,15 @@ Projects compatible with `pre-commit-crocodile` can use this badge to ease thing
143
152
 
144
153
  ## Projects with configurations | [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
145
154
 
155
+ ### Configure engine to use (once per user)
156
+
157
+ - **[prek](https://github.com/j178/prek):** Recent Rust re-implementation, in development and faster (default, recommended)
158
+ - **[pre-commit](https://pre-commit.com/):** Original Python implementation, stable but slower (legacy)
159
+
160
+ ```bash
161
+ pre-commit-crocodile --set-engine [pre-commit,prek]
162
+ ```
163
+
146
164
  ### Install dependencies (once per user)
147
165
 
148
166
  ```bash
@@ -19,5 +19,5 @@ RUN --mount=type=cache,target=/root/.cache \
19
19
  && rm -f /tmp/commits.txt
20
20
 
21
21
  # Create image version
22
- ARG IMAGE_VERSION=6
22
+ ARG IMAGE_VERSION=7
23
23
  RUN echo -n "${IMAGE_VERSION}" >/VERSION
@@ -41,6 +41,7 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
41
41
  ```yaml title="Sources / .gitlab-ci.yml"
42
42
  include:
43
43
  - component: gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@X.Y.Z # Adapt to latest release tag
44
+ # remote: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/-/raw/X.Y.Z/templates/commits.yml # Use on self-managed GitLab instances
44
45
  inputs:
45
46
  stage: prepare
46
47
 
@@ -38,6 +38,7 @@ default_stages:
38
38
  - pre-commit
39
39
  - pre-push
40
40
  minimum_pre_commit_version: 3.8.0
41
+ minimum_prek_version: 0.2.0
41
42
 
42
43
  # pre-commit repositories
43
44
  repos:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pre-commit-crocodile
3
- Version: 7.0.0
3
+ Version: 8.0.0
4
4
  Summary: Git hooks manager intended for developers using pre-commit, prek and commitizen
5
5
  Home-page: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile
6
6
  Author: Adrian DC
@@ -85,13 +85,20 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
85
85
  - **CLI - [prek](https://github.com/j178/prek):** Better `pre-commit`, re-engineered in Rust
86
86
  - **CLI - [commitizen](https://commitizen-tools.github.io/commitizen/):** Commits tools and validation based upon [conventional commits](https://www.conventionalcommits.org/en/)
87
87
  - **Hooks - [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks):** Common `pre-commit` hooks useful for developers
88
- - **Hooks - `prepare-commit-msg`:** Prepare commit message automatically based on changes
88
+
89
+ **`pre-commit-crocodile` provides the following features:**
90
+
91
+ - **CLI - [pre-commit-crocodile](.):** Management tool for `pre-commit` Git hooks
92
+ - **CLI - [pre-commit-crocodile](.):** Easy Git hooks activation for development teams
93
+ - **CLI - [pre-commit-crocodile](.):** Dependencies preparation for [pre-commit](https://pre-commit.com/) or [prek](https://github.com/j178/prek).
94
+ - **CLI - [pre-commit-crocodile](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/pre-commit/):** Automated customized configurations for maintainers
95
+ - **Hooks - [prepare-commit-msg](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile/hooks/):** Prepare commit message automatically based on changes
89
96
 
90
97
  ---
91
98
 
92
99
  ## Preview
93
100
 
94
- ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/7.0.0/docs/preview.svg)
101
+ ![preview.svg](https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/raw/8.0.0/docs/preview.svg)
95
102
 
96
103
  ---
97
104
 
@@ -105,7 +112,8 @@ Git hooks manager intended for developers using [pre-commit](https://pre-commit.
105
112
  ```yaml
106
113
  usage: pre-commit-crocodile [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
107
114
  [-l | -i | -c | -b | -e | -d | -a | -C | -r] [--config FOLDER | -D] [--commit]
108
- [--components | --no-components] [--offline] [--stage STAGE] [--set-engine [ENGINE]] [--]
115
+ [--components | --remotes | --no-components] [--offline] [--stage STAGE]
116
+ [--set-engine [ENGINE]] [--]
109
117
 
110
118
  pre-commit-crocodile: Git hooks manager intended for developers using pre-commit, prek and commitizen
111
119
 
@@ -135,6 +143,7 @@ configurations arguments:
135
143
  -D, --default # Use global default configurations instead of sources
136
144
  --commit # Commit configurations changes automatically (implies --configure)
137
145
  --components # Import components from GitLab with 'include: component:'
146
+ --remotes # Import components from GitLab with 'include: remote:'
138
147
  --no-components # Import components templates locally instead of 'include: component:'
139
148
  --offline # Use offline mode to disable configurations autoupdate
140
149
  --stage STAGE # Run a specific pre-commit stage with --run
@@ -193,6 +202,15 @@ Projects compatible with `pre-commit-crocodile` can use this badge to ease thing
193
202
 
194
203
  ## Projects with configurations | [![pre-commit-crocodile](https://img.shields.io/badge/pre--commit--crocodile-enabled-brightgreen?logo=gitlab)](https://radiandevcore.gitlab.io/tools/pre-commit-crocodile)
195
204
 
205
+ ### Configure engine to use (once per user)
206
+
207
+ - **[prek](https://github.com/j178/prek):** Recent Rust re-implementation, in development and faster (default, recommended)
208
+ - **[pre-commit](https://pre-commit.com/):** Original Python implementation, stable but slower (legacy)
209
+
210
+ ```bash
211
+ pre-commit-crocodile --set-engine [pre-commit,prek]
212
+ ```
213
+
196
214
  ### Install dependencies (once per user)
197
215
 
198
216
  ```bash
@@ -64,7 +64,7 @@ requirements/tests.txt
64
64
  src/__init__.py
65
65
  src/__main__.py
66
66
  src/assets/.cz.yaml
67
- src/assets/.pre-commit-config.yaml
67
+ src/assets/.pre-commit-config.template.yaml
68
68
  src/assets/__init__.py
69
69
  src/assets/commits.yml
70
70
  src/cli/__init__.py
@@ -0,0 +1,4 @@
1
+ git+https://github.com/AdrianDC/commitizen.git@4.9.1+adriandc.20250914
2
+ pre-commit>=3.8.0
3
+ prek>=0.2.0
4
+ uv>=0.8.15
@@ -1,4 +1,4 @@
1
- git+https://github.com/AdrianDC/commitizen.git@4.8.2+adriandc.20250608
1
+ git+https://github.com/AdrianDC/commitizen.git@4.9.1+adriandc.20250914
2
2
  mkdocs>=1.6.0
3
3
  mkdocs-awesome-pages-plugin>=2.9.3
4
4
  mkdocs-coverage>=1.1.0
@@ -1,4 +1,4 @@
1
- git+https://github.com/AdrianDC/commitizen.git@4.8.2+adriandc.20250608
1
+ git+https://github.com/AdrianDC/commitizen.git@4.9.1+adriandc.20250914
2
2
  mypy>=0.971
3
3
  pre-commit>=3.8.0
4
4
  pylint>=2.6.0
@@ -10,7 +10,7 @@ default_stages:
10
10
  - pre-push
11
11
  - prepare-commit-msg
12
12
  minimum_pre_commit_version: 3.8.0
13
- minimum_prek_version: 0.0.25
13
+ minimum_prek_version: 0.2.0
14
14
 
15
15
  # pre-commit exclusions
16
16
  exclude: >
@@ -78,7 +78,7 @@ repos:
78
78
 
79
79
  # Repository: commitizen
80
80
  - repo: https://github.com/commitizen-tools/commitizen
81
- rev: v4.8.3
81
+ rev: v4.9.1
82
82
  hooks:
83
83
  - id: commitizen
84
84
  stages:
@@ -91,7 +91,7 @@ repos:
91
91
 
92
92
  # Repository: pre-commit-crocodile
93
93
  - repo: https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile
94
- rev: {PACKAGE_REVISION}
94
+ rev: PACKAGE_REVISION
95
95
  hooks:
96
96
  - id: check-yaml-ruamel-pure
97
97
  - id: prepare-commit-message
@@ -13,11 +13,11 @@ spec:
13
13
  default: ''
14
14
  description: 'Defines the commits jobs names to skip (Default: "")'
15
15
  version_minimal:
16
- default: 6
17
- description: 'Defines the commits image minimal version (Default: 6)'
16
+ default: 7
17
+ description: 'Defines the commits image minimal version (Default: 7)'
18
18
  pre_commit:
19
- default: pre-commit
20
- description: 'Defines the commits pre-commit engine name (pre-commmit or prek, default: pre-commit)'
19
+ default: prek
20
+ description: 'Defines the commits pre-commit engine name (pre-commmit or prek, default: prek)'
21
21
  ---
22
22
  $[[ inputs.name ]]:
23
23
  image: $[[ inputs.image ]]
@@ -112,6 +112,15 @@ $[[ inputs.name ]]:
112
112
  $[[ inputs.pre_commit ]] install --install-hooks
113
113
  fi
114
114
  SKIP="${skip}" $[[ inputs.pre_commit ]] run --all-files --show-diff-on-failure
115
+ # Validate duplicated commits
116
+ - |
117
+ set +x
118
+ if git log --pretty='%s' "${range_sha}" | sort | uniq -D | grep '.'; then
119
+ echo ' '
120
+ echo " [ERROR] Detected duplicated commits titles in range '${range_sha}'"
121
+ echo ' '
122
+ false
123
+ fi
115
124
  # Validate WIP commits
116
125
  - |
117
126
  set +x
@@ -48,10 +48,14 @@ class Entrypoint:
48
48
  command_add_string: str
49
49
  command_commit: List[str]
50
50
  command_commit_string: str
51
- components_sources: bool = False
52
51
  configurations_existed: bool = False
53
52
  configurations_files: List[str] = []
54
53
  data: str
54
+ include_components: bool = False
55
+ include_prefix: str
56
+ include_remotes: bool = False
57
+ include_sources: bool = False
58
+ include_value: str
55
59
  local_ci_data: str
56
60
  local_template: str
57
61
 
@@ -199,7 +203,7 @@ class Entrypoint:
199
203
 
200
204
  # Acquire pre-commit configuration
201
205
  file.write(resources_files(Bundle.RESOURCES_ASSETS) \
202
- .joinpath(PreCommit.CONFIGURATION_FILE) \
206
+ .joinpath(PreCommit.CONFIGURATION_TEMPLATE) \
203
207
  .read_text(encoding='utf8') \
204
208
  .replace(PreCommit.REV_TEMPLATE, Version.revision()))
205
209
  file.flush()
@@ -260,27 +264,45 @@ class Entrypoint:
260
264
  f'{Colors.RESET}')
261
265
  print(' ')
262
266
 
263
- # Export assets files
264
- for asset in [
265
- Commitizen.CONFIGURATION_FILE,
267
+ # Export pre-commit assets file
268
+ if Path(PreCommit.CONFIGURATION_FILE).exists():
269
+ configurations_existed = True
270
+ print(
271
+ f'exporting configuration in {PreCommit.CONFIGURATION_FILE} configuration'
272
+ )
273
+ configurations_files += [PreCommit.CONFIGURATION_FILE]
274
+ data = resources_files(Bundle.RESOURCES_ASSETS) \
275
+ .joinpath(PreCommit.CONFIGURATION_TEMPLATE) \
276
+ .read_text(encoding='utf8') \
277
+ .replace(PreCommit.REV_TEMPLATE, Version.revision())
278
+ with open(
266
279
  PreCommit.CONFIGURATION_FILE,
267
- ]:
268
- if Path(asset).exists():
269
- configurations_existed = True
270
- print(f'exporting configuration in {asset} configuration')
271
- configurations_files += [asset]
272
- data = resources_files(Bundle.RESOURCES_ASSETS) \
273
- .joinpath(asset) \
274
- .read_text(encoding='utf8') \
275
- .replace(PreCommit.REV_TEMPLATE, Version.revision())
276
- with open(
277
- asset,
278
- encoding='utf8',
279
- mode='w',
280
- ) as f:
281
- f.write(data)
282
- if Platform.IS_TTY_STDIN:
283
- sleep(0.5)
280
+ encoding='utf8',
281
+ mode='w',
282
+ ) as f:
283
+ f.write(data)
284
+ if Platform.IS_TTY_STDIN:
285
+ sleep(0.5)
286
+
287
+ # Export Commitizen assets file
288
+ if Path(Commitizen.CONFIGURATION_FILE).exists():
289
+ configurations_existed = True
290
+ print(
291
+ f'exporting configuration in {Commitizen.CONFIGURATION_FILE} configuration'
292
+ )
293
+ configurations_files += [Commitizen.CONFIGURATION_FILE]
294
+ data = resources_files(Bundle.RESOURCES_ASSETS) \
295
+ .joinpath(Commitizen.CONFIGURATION_FILE) \
296
+ .read_text(encoding='utf8') \
297
+ .replace(PreCommit.REV_TEMPLATE, Version.revision())
298
+ with open(
299
+ Commitizen.CONFIGURATION_FILE,
300
+ encoding='utf8',
301
+ mode='w',
302
+ ) as f:
303
+ f.write(data)
304
+ if Platform.IS_TTY_STDIN:
305
+ sleep(0.5)
284
306
 
285
307
  # Autoupdate pre-commit hooks
286
308
  if not options.offline and Git.is_repository():
@@ -313,15 +335,18 @@ class Entrypoint:
313
335
 
314
336
  # Detect if components in sources
315
337
  if options.components:
316
- components_sources = False
338
+ include_components = True
339
+ elif options.remotes:
340
+ include_remotes = True
317
341
  elif options.no_components:
318
- components_sources = True
342
+ include_sources = True
343
+ elif any(Bundle.COMPONENTS_SAAS_DOMAIN in url for url in Git.urls()):
344
+ include_components = True
319
345
  else:
320
- components_sources = not any(Bundle.COMPONENTS_DOMAIN in url
321
- for url in Git.urls())
346
+ include_remotes = True
322
347
 
323
348
  # Bind components version
324
- if not components_sources:
349
+ if include_components:
325
350
 
326
351
  # Install components configurations
327
352
  print(' ')
@@ -333,32 +358,97 @@ class Entrypoint:
333
358
  print(' ')
334
359
 
335
360
  # Inject component in .gitlab-ci.yml
361
+ include_value = Bundle.COMPONENTS_SAAS_COMMITS.replace(
362
+ Bundle.COMPONENTS_PACKAGE_VERSION,
363
+ Version.revision(),
364
+ )
365
+ include_prefix = Bundle.COMPONENTS_SAAS_COMMITS.split(
366
+ Bundle.COMPONENTS_PACKAGE_VERSION,
367
+ 1,
368
+ )[0]
369
+ local_ci_data = ''
370
+ with open(Gcil.FILE, encoding='utf8') as local_ci_file:
371
+ local_ci_data = local_ci_file.read()
372
+ if include_value not in local_ci_data:
373
+ configurations_files += [Gcil.FILE]
374
+ with open(
375
+ Gcil.FILE,
376
+ encoding='utf8',
377
+ mode='w',
378
+ ) as f:
379
+ if f'component: {include_prefix}' not in local_ci_data:
380
+ f.write(
381
+ Gcil.EOL.join([
382
+ 'include:',
383
+ f' - component: {include_value}',
384
+ ' inputs:',
385
+ ' stage: test',
386
+ ' name: commits',
387
+ '',
388
+ '',
389
+ ]))
390
+ else:
391
+ local_ci_data = Gcil.EOL.join([
392
+ f'{line[0:line.find(include_prefix)]}{include_value}' #
393
+ if f'component: {include_prefix}' in line #
394
+ else line #
395
+ for line in local_ci_data.splitlines()
396
+ ]) + Gcil.EOL
397
+ if 'stages:' not in local_ci_data.splitlines():
398
+ f.write(Gcil.EOL.join([
399
+ 'stages:',
400
+ ' - test',
401
+ '',
402
+ ]))
403
+ f.write(local_ci_data)
404
+
405
+ # Bind remotes version
406
+ elif include_remotes:
407
+
408
+ # Install remotes configurations
409
+ print(' ')
410
+ print(f'{Colors.GREEN} ===['
411
+ f'{Colors.YELLOW} Configure sources: '
412
+ f'{Colors.YELLOW_LIGHT}remotes'
413
+ f'{Colors.GREEN} ]==='
414
+ f'{Colors.RESET}')
415
+ print(' ')
416
+
417
+ # Inject remote in .gitlab-ci.yml
418
+ include_value = Bundle.COMPONENTS_REMOTE_COMMITS.replace(
419
+ Bundle.COMPONENTS_PACKAGE_VERSION,
420
+ Version.revision(),
421
+ )
422
+ include_prefix = Bundle.COMPONENTS_REMOTE_COMMITS.split(
423
+ Bundle.COMPONENTS_PACKAGE_VERSION,
424
+ 1,
425
+ )[0]
336
426
  local_ci_data = ''
337
427
  with open(Gcil.FILE, encoding='utf8') as local_ci_file:
338
428
  local_ci_data = local_ci_file.read()
339
- if f'{Bundle.COMPONENT_COMMITS}@{Version.get()}' not in local_ci_data:
429
+ if include_value not in local_ci_data:
340
430
  configurations_files += [Gcil.FILE]
341
431
  with open(
342
432
  Gcil.FILE,
343
433
  encoding='utf8',
344
434
  mode='w',
345
435
  ) as f:
346
- if f'{Bundle.COMPONENT_COMMITS}@' not in local_ci_data:
436
+ if f'remote: {include_prefix}' not in local_ci_data:
347
437
  f.write(
348
438
  Gcil.EOL.join([
349
439
  'include:',
350
- f' - component: {Bundle.COMPONENT_COMMITS}@{Version.get()}',
440
+ f' - remote: {include_value}',
351
441
  ' inputs:',
352
442
  ' stage: test',
353
- f' name: {Bundle.COMPONENT_COMMITS.rsplit("/", 1)[-1]}',
443
+ ' name: commits',
354
444
  '',
355
445
  '',
356
446
  ]))
357
447
  else:
358
448
  local_ci_data = Gcil.EOL.join([
359
- f'{line[0:line.rfind("@")]}@{Version.get()}' #
360
- if f'component: {Bundle.COMPONENT_COMMITS}@' in line else
361
- line #
449
+ f'{line[0:line.find(include_prefix)]}{include_value}' #
450
+ if f'remote: {include_prefix}' in line #
451
+ else line #
362
452
  for line in local_ci_data.splitlines()
363
453
  ]) + Gcil.EOL
364
454
  if 'stages:' not in local_ci_data.splitlines():
@@ -370,7 +460,7 @@ class Entrypoint:
370
460
  f.write(local_ci_data)
371
461
 
372
462
  # Export components sources
373
- else:
463
+ elif include_sources:
374
464
 
375
465
  # Install templates configurations
376
466
  print(' ')
@@ -200,6 +200,12 @@ def main() -> None:
200
200
  action='store_true',
201
201
  help='Import components from GitLab with \'include: component:\'',
202
202
  )
203
+ subgroup.add_argument(
204
+ '--remotes',
205
+ dest='remotes',
206
+ action='store_true',
207
+ help='Import components from GitLab with \'include: remote:\'',
208
+ )
203
209
  subgroup.add_argument(
204
210
  '--no-components',
205
211
  dest='no_components',
@@ -23,7 +23,7 @@ class Commitizen:
23
23
  PACKAGES: List[str] = ['commitizen']
24
24
  SOURCES: str = 'git+https://github.com/AdrianDC/commitizen.git'
25
25
  TITLE: str = 'commitizen'
26
- VERSION_COMPATIBLE: str = '4.8.2+adriandc.20250608'
26
+ VERSION_COMPATIBLE: str = '4.9.1+adriandc.20250914'
27
27
 
28
28
  # Internals
29
29
  __flags_configuration: List[str] = []
@@ -27,7 +27,7 @@ class Gcil:
27
27
  HOOK_NAME: str = 'Run GitLab CI job with gcil'
28
28
  HOOKS_LABEL: str = 'gcil'
29
29
  HOOKS_URL: str = 'https://gitlab.com/RadianDevCore/tools/gcil'
30
- HOOKS_VERSION_MINIMAL: str = '13.0.0'
30
+ HOOKS_VERSION_MINIMAL: str = '13.0.1'
31
31
  MARKER_NODE: str = '.local:'
32
32
  MARKER_VARIABLE: str = 'CI_LOCAL'
33
33
 
@@ -20,13 +20,14 @@ class PreCommit:
20
20
  CONFIGURATION_EOL: str = '\n'
21
21
  CONFIGURATION_EXTENSION: str = '.yaml'
22
22
  CONFIGURATION_FILE: str = '.pre-commit-config.yaml'
23
+ CONFIGURATION_TEMPLATE: str = '.pre-commit-config.template.yaml'
23
24
  ENGINE: str = 'pre-commit'
24
25
  HOOK_CHECK_HOOKS_APPLY: str = 'check-hooks-apply'
25
26
  HOOK_CHECK_USELESS_EXCLUDES: str = 'check-useless-excludes'
26
27
  HOOKS_APPLY_ERROR: str = ' does not apply to this repository'
27
28
  HOOKS_EXCLUDE_DELIMITER: str = ' for '
28
29
  HOOKS_EXCLUDE_ERROR: str = ' does not match any files'
29
- REV_TEMPLATE: str = '{PACKAGE_REVISION}'
30
+ REV_TEMPLATE: str = 'PACKAGE_REVISION'
30
31
 
31
32
  # Defaults
32
33
  DEFAULT_BINARY: str = 'pre-commit'
@@ -50,24 +51,24 @@ class PreCommit:
50
51
  # Prepare settings
51
52
  settings: Settings = Settings(name=Bundle.NAME)
52
53
 
53
- # Detect Prek engine
54
- if settings.get('engines', 'pre_commit') == Prek.ENGINE:
55
- PreCommit.BINARY = Prek.DEFAULT_BINARY
56
- PreCommit.PACKAGES = Prek.DEFAULT_PACKAGES
57
- PreCommit.TITLE = Prek.DEFAULT_TITLE
58
-
59
- # Show pre-commit engine
60
- else:
54
+ # Configure pre-commit engine
55
+ if settings.get('engines', 'pre_commit') == PreCommit.ENGINE:
61
56
  PreCommit.BINARY = PreCommit.DEFAULT_BINARY
62
57
  PreCommit.PACKAGES = PreCommit.DEFAULT_PACKAGES
63
58
  PreCommit.TITLE = PreCommit.DEFAULT_TITLE
64
59
 
60
+ # Configure Prek engine
61
+ else:
62
+ PreCommit.BINARY = Prek.DEFAULT_BINARY
63
+ PreCommit.PACKAGES = Prek.DEFAULT_PACKAGES
64
+ PreCommit.TITLE = Prek.DEFAULT_TITLE
65
+
65
66
  # Autoupdate
66
67
  @staticmethod
67
68
  def autoupdate(repo: str = '') -> bool:
68
69
 
69
70
  # Clean pre-commit
70
- return Commands.run(PreCommit.DEFAULT_BINARY, [
71
+ return Commands.run(PreCommit.BINARY, [
71
72
  'autoupdate',
72
73
  ] + PreCommit.__flags_configuration + ([
73
74
  '--repo',
@@ -37,5 +37,7 @@ class Bundle:
37
37
  ENV_NO_COLOR: str = 'NO_COLOR'
38
38
 
39
39
  # Components
40
- COMPONENT_COMMITS: str = 'gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits'
41
- COMPONENTS_DOMAIN: str = 'gitlab.com'
40
+ COMPONENTS_PACKAGE_VERSION: str = '[PACKAGE_VERSION]'
41
+ COMPONENTS_REMOTE_COMMITS: str = f'https://gitlab.com/RadianDevCore/tools/pre-commit-crocodile/-/raw/{COMPONENTS_PACKAGE_VERSION}/templates/commits.yml'
42
+ COMPONENTS_SAAS_COMMITS: str = f'gitlab.com/RadianDevCore/tools/pre-commit-crocodile/commits@{COMPONENTS_PACKAGE_VERSION}'
43
+ COMPONENTS_SAAS_DOMAIN: str = 'gitlab.com'
@@ -13,11 +13,11 @@ spec:
13
13
  default: ''
14
14
  description: 'Defines the commits jobs names to skip (Default: "")'
15
15
  version_minimal:
16
- default: 6
17
- description: 'Defines the commits image minimal version (Default: 6)'
16
+ default: 7
17
+ description: 'Defines the commits image minimal version (Default: 7)'
18
18
  pre_commit:
19
- default: pre-commit
20
- description: 'Defines the commits pre-commit engine name (pre-commmit or prek, default: pre-commit)'
19
+ default: prek
20
+ description: 'Defines the commits pre-commit engine name (pre-commmit or prek, default: prek)'
21
21
  ---
22
22
  $[[ inputs.name ]]:
23
23
  image: $[[ inputs.image ]]
@@ -112,6 +112,15 @@ $[[ inputs.name ]]:
112
112
  $[[ inputs.pre_commit ]] install --install-hooks
113
113
  fi
114
114
  SKIP="${skip}" $[[ inputs.pre_commit ]] run --all-files --show-diff-on-failure
115
+ # Validate duplicated commits
116
+ - |
117
+ set +x
118
+ if git log --pretty='%s' "${range_sha}" | sort | uniq -D | grep '.'; then
119
+ echo ' '
120
+ echo " [ERROR] Detected duplicated commits titles in range '${range_sha}'"
121
+ echo ' '
122
+ false
123
+ fi
115
124
  # Validate WIP commits
116
125
  - |
117
126
  set +x
@@ -1,4 +0,0 @@
1
- git+https://github.com/AdrianDC/commitizen.git@4.8.2+adriandc.20250608
2
- pre-commit>=3.8.0
3
- prek>=0.0.25
4
- uv>=0.8.10