mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Make autoupdate slightly more future proof
This commit is contained in:
parent
308f2cb9cd
commit
8d589a5e97
3 changed files with 33 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ def _update_repo(repo_config, runner, tags_only):
|
|||
new_repo = Repository.create(new_config, runner.store)
|
||||
|
||||
# See if any of our hooks were deleted with the new commits
|
||||
hooks = {hook_id for hook_id, _ in repo.hooks}
|
||||
hooks = {hook['id'] for hook in repo.repo_config['hooks']}
|
||||
hooks_missing = hooks - (hooks & set(new_repo.manifest.hooks))
|
||||
if hooks_missing:
|
||||
raise RepositoryCannotBeUpdatedError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue