Skip to content

Commit ae51789

Browse files
committed
🩹 fix-simple(Renovate): add a custom regex manager for pre-commit hooks in Jinja template
1 parent 96a22c4 commit ae51789

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

‎.renovaterc.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,21 @@
2121
"matchStrings": [
2222
"- \\*\\*(?<depName>Copier|copier-templates-extensions)\\*\\* \u2265 (?<currentValue>.*?)\\s"
2323
]
24+
},
25+
{
26+
"description": "Update pre-commit hook revs in Jinja template",
27+
"customType": "regex",
28+
"datasourceTemplate": "github-tags",
29+
"depNameTemplate": "{{{ depName }}}",
30+
"extractVersionTemplate": "{{currentValue}}",
31+
"matchStrings": [
32+
"(?ms)^\\s*-\\s*repo:\\s*https?://github\\.com/(?<depName>[^/\\s]+/[^/\\s]+)\\b.*?\\n\\s*rev:\\s*[\"']?(?<currentValue>v?\\d+\\.\\d+\\.\\d+)[\"']?"
33+
],
34+
"managerFilePatterns": [
35+
"/^template/\\.pre-commit-config\\.ya?ml(?:\\.jinja)?$/"
36+
]
2437
}
2538
],
26-
"pre-commit": {
27-
"managerFilePatterns": [
28-
"/(^|/)template/\\.pre-commit-config\\.ya?ml(?:\\.jinja)?$/"
29-
]
30-
},
3139
"github-actions": {
3240
"managerFilePatterns": [
3341
"/^template/.+\\.github.+/actions/.*\\.ya?ml(?:\\.jinja)?$/",

0 commit comments

Comments
 (0)