Skip to content

Commit

Permalink
fix(pre-commit): Trim '.git' suffix from dep name (#10875)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored Jul 16, 2021
1 parent 61f2f65 commit f029720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.4.0
hooks:
- id: trailing-whitespace
Expand Down
3 changes: 2 additions & 1 deletion lib/manager/pre-commit/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function extractDependency(
for (const urlMatcher of urlMatchers) {
const match = urlMatcher.exec(repository);
if (match) {
const { hostname, depName } = match.groups;
const hostname = match.groups.hostname;
const depName = match.groups.depName.replace(/\.git$/i, '');
const sourceDef = determineDatasource(repository, hostname);
return {
...sourceDef,
Expand Down

0 comments on commit f029720

Please sign in to comment.