diff --git a/examples/for_axios.py b/examples/for_axios.py index 8a9de7c..d40fe2b 100644 --- a/examples/for_axios.py +++ b/examples/for_axios.py @@ -1,4 +1,6 @@ +import os import pathlib +import subprocess import sys import warnings @@ -14,6 +16,11 @@ warnings.warn(f"clone axios to {axios_repo} first") sys.exit(0) +# dump gh issues +issue_json_file = "issues.json" +subprocess.check_call(f"gh issue list --json title,number --limit 5000 --state=all > {issue_json_file}", shell=True) +assert os.path.isfile(issue_json_file) + collector = Collector() collector.config.repo_root = axios_repo collector.config.max_depth_limit = -1 @@ -21,6 +28,7 @@ ctx = collector.collect_metadata() storage = Storage() +storage.config.load_issue_mapping_from_gh_json_file((axios_repo / issue_json_file).as_posix()) storage.embed_ctx(ctx) tagger = Tagger() tagger.config.tags = [