mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-07 10:53:17 +02:00
Fix 'qmk generate-develop-pr-list' for ghapi v2 (#26428)
This commit is contained in:
@@ -39,7 +39,12 @@ def _try_open_cache(cli):
|
||||
return None
|
||||
|
||||
cache_loc = Path(cli.config_file).parent
|
||||
return SqliteCache(cache_loc)
|
||||
cache = SqliteCache(cache_loc)
|
||||
|
||||
if cli.args.clean:
|
||||
cache.clear()
|
||||
|
||||
return cache
|
||||
|
||||
|
||||
def _get_github():
|
||||
@@ -48,9 +53,11 @@ def _get_github():
|
||||
except ImportError:
|
||||
return None
|
||||
|
||||
return GhApi()
|
||||
# ghapi v2 (July 2026) is now async by default - luckily v1 happily ignores the sync argument
|
||||
return GhApi(sync=True)
|
||||
|
||||
|
||||
@cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove cache before list generation.")
|
||||
@cli.argument('-f', '--from-ref', default='0.11.0', help='Git revision/tag/reference/branch to begin search')
|
||||
@cli.argument('-b', '--branch', default='upstream/develop', help='Git branch to iterate (default: "upstream/develop")')
|
||||
@cli.subcommand('Creates the develop PR list.', hidden=False if cli.config.user.developer else True)
|
||||
|
||||
Reference in New Issue
Block a user