Skip to content
Snippets Groups Projects
Unverified Commit e33df09f authored by Sebastian Poxhofer's avatar Sebastian Poxhofer Committed by GitHub
Browse files

fix(pre-commit): allow hooks in the format git:// (#9858)

parent b6ad7979
No related branches found
No related tags found
No related merge requests found
...@@ -8,3 +8,7 @@ repos: ...@@ -8,3 +8,7 @@ repos:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: check-added-large-files - id: check-added-large-files
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: check-merge-conflict
...@@ -118,6 +118,13 @@ Object { ...@@ -118,6 +118,13 @@ Object {
"depType": "repository", "depType": "repository",
"lookupName": "pre-commit/pre-commit-hooks", "lookupName": "pre-commit/pre-commit-hooks",
}, },
Object {
"currentValue": "v2.1.0",
"datasource": "github-tags",
"depName": "pre-commit/pre-commit-hooks",
"depType": "repository",
"lookupName": "pre-commit/pre-commit-hooks",
},
], ],
} }
`; `;
...@@ -92,6 +92,8 @@ function extractDependency( ...@@ -92,6 +92,8 @@ function extractDependency(
regEx('^https?:\\/\\/(?<hostname>[^\\/]+)\\/(?<depName>\\S*)'), regEx('^https?:\\/\\/(?<hostname>[^\\/]+)\\/(?<depName>\\S*)'),
// This splits "git@private.registry.com:user/repo" -> "private.registry.com" "user/repo // This splits "git@private.registry.com:user/repo" -> "private.registry.com" "user/repo
regEx('^git@(?<hostname>[^:]+):(?<depName>\\S*)'), regEx('^git@(?<hostname>[^:]+):(?<depName>\\S*)'),
// This split "git://github.com/pre-commit/pre-commit-hooks" -> "github.com" "pre-commit/pre-commit-hooks"
/^git:\/\/(?<hostname>[^/]+)\/(?<depName>\S*)/,
]; ];
for (const urlMatcher of urlMatchers) { for (const urlMatcher of urlMatchers) {
const match = urlMatcher.exec(repository); const match = urlMatcher.exec(repository);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment