Skip to content

Commit

Permalink
fix for local repo
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Jan 5, 2025
1 parent 157690e commit 96e33b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/modules/manager/pre-commit/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
matchesPrecommitConfigHeuristic,
matchesPrecommitDependencyHeuristic,
} from './parsing';
import type { PreCommitConfig } from './types';
import { pep508ToPackageDependency } from '../pep621/utils';

Check failure on line 15 in lib/modules/manager/pre-commit/extract.ts

View workflow job for this annotation

GitHub Actions / lint-eslint

`../pep621/utils` import should occur before type import of `../types`
import type { PreCommitConfig } from './types';

/**
* Determines the datasource(id) to be used for this dependency
Expand Down Expand Up @@ -156,6 +156,10 @@ function findDependencies(precommitFile: PreCommitConfig): PackageDependency[] {
});
});
precommitFile.repos.forEach((item) => {
if (!item.rev){
return;
}

if (matchesPrecommitDependencyHeuristic(item)) {
logger.trace(item, 'Matched pre-commit dependency spec');
const repository = String(item.repo);
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/pre-commit/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export interface PreCommitHook {
export interface PreCommitDependency {
repo: string;
hooks?: Array<PreCommitHook>;
rev: string;
rev?: string;
}

0 comments on commit 96e33b5

Please sign in to comment.