Skip to content

Commit

Permalink
chore: example of analysing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Dec 16, 2023
1 parent 166d68c commit 05989c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/for_axios.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
import pathlib
import subprocess
import sys
import warnings

Expand All @@ -14,13 +16,19 @@
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
collector.config.include_regex = r"lib.*"

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 = [
Expand Down

0 comments on commit 05989c7

Please sign in to comment.