Fix 'qmk generate-develop-pr-list' for ghapi v2 (#26428)

This commit is contained in:
Joel Challis
2026-08-30 23:45:18 +01:00
committed by GitHub
parent 4b16b5e520
commit 698894aef0
@@ -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)