mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Allow autoupdate --repo to be specified multiple times
This commit is contained in:
parent
29715c9268
commit
f76d3c4f95
3 changed files with 7 additions and 6 deletions
|
|
@ -106,7 +106,7 @@ def _write_new_config_file(path, output):
|
|||
f.write(to_write)
|
||||
|
||||
|
||||
def autoupdate(runner, tags_only, repo=None):
|
||||
def autoupdate(runner, tags_only, repos=()):
|
||||
"""Auto-update the pre-commit config to the latest versions of repos."""
|
||||
migrate_config(runner, quiet=True)
|
||||
retv = 0
|
||||
|
|
@ -120,7 +120,7 @@ def autoupdate(runner, tags_only, repo=None):
|
|||
is_local_repo(repo_config) or
|
||||
is_meta_repo(repo_config) or
|
||||
# Skip updating any repo_configs that aren't for the specified repo
|
||||
repo and repo != repo_config['repo']
|
||||
repos and repo_config['repo'] not in repos
|
||||
):
|
||||
output_repos.append(repo_config)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue