File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ CLI Usage is as follows::
4141 [-P] [-F] [--prefer-ssh] [-v]
4242 [--keychain-name OSX_KEYCHAIN_ITEM_NAME]
4343 [--keychain-account OSX_KEYCHAIN_ITEM_ACCOUNT]
44- [--releases] [--assets] [--throttle-limit THROTTLE_LIMIT ]
45- [--throttle-pause THROTTLE_PAUSE]
44+ [--releases] [--assets] [--exclude [REPOSITORY [REPOSITORY ...] ]
45+ [--throttle-limit THROTTLE_LIMIT] [--throttle- pause THROTTLE_PAUSE]
4646 USER
4747
4848 Backup a github account
@@ -112,6 +112,8 @@ CLI Usage is as follows::
112112 binaries
113113 --assets include assets alongside release information; only
114114 applies if including releases
115+ --exclude [REPOSITORY [REPOSITORY ...]]
116+ names of repositories to exclude from backup.
115117 --throttle-limit THROTTLE_LIMIT
116118 start throttling of GitHub API requests after this
117119 amount of API requests remain
Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ def parse_args(args=None):
328328 type = float ,
329329 default = 30.0 ,
330330 help = 'wait this amount of seconds when API request throttling is active (default: 30.0, requires --throttle-limit to be set)' )
331+ parser .add_argument ('--exclude' ,
332+ dest = 'exclude' ,
333+ help = 'names of repositories to exclude' ,
334+ nargs = "*" )
331335 return parser .parse_args (args )
332336
333337
@@ -753,6 +757,8 @@ def filter_repositories(args, unfiltered_repositories):
753757 repositories = [r for r in repositories if name_regex .match (r ['name' ])]
754758 if args .skip_archived :
755759 repositories = [r for r in repositories if not r .get ('archived' )]
760+ if args .exclude :
761+ repositories = [r for r in repositories if r ['name' ] not in args .exclude ]
756762
757763 return repositories
758764
You can’t perform that action at this time.
0 commit comments