mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add repo option to autoupdate
This commit is contained in:
parent
0ec3b5556f
commit
4d0c400066
3 changed files with 38 additions and 3 deletions
|
|
@ -167,6 +167,12 @@ def main(argv=None):
|
|||
'tagged version (the default behavior).'
|
||||
),
|
||||
)
|
||||
autoupdate_parser.add_argument(
|
||||
'--repo', nargs=1, default=None,
|
||||
help=(
|
||||
'Repository to update the hooks of.'
|
||||
),
|
||||
)
|
||||
|
||||
migrate_config_parser = subparsers.add_parser(
|
||||
'migrate-config',
|
||||
|
|
@ -245,7 +251,11 @@ def main(argv=None):
|
|||
elif args.command == 'autoupdate':
|
||||
if args.tags_only:
|
||||
logger.warning('--tags-only is the default')
|
||||
return autoupdate(runner, tags_only=not args.bleeding_edge)
|
||||
return autoupdate(
|
||||
runner,
|
||||
tags_only=not args.bleeding_edge,
|
||||
repo=args.repo,
|
||||
)
|
||||
elif args.command == 'migrate-config':
|
||||
return migrate_config(runner)
|
||||
elif args.command == 'run':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue