Skip to content

Commit

Permalink
adding closed issues too
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Mar 14, 2022
1 parent f14d173 commit 23bc16b
Show file tree
Hide file tree
Showing 27,047 changed files with 537,094 additions and 2,349 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
14 changes: 7 additions & 7 deletions 2.spack-issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@
import os
import argparse
import sys
import os

sys.path.insert(0, os.getcwd())
from helpers import write_json

token = os.environ.get("GITHUB_TOKEN")
if not token:
sys.exit("Yo dawg this is a LOT of API calls, you really need a GITHUB_TOKEN")


def get_issues(issues_dir):
g1 = Github(token)

org = g1.get_organization("spack")
repo = org.get_repo("spack")

issues = repo.get_issues()
issues = repo.get_issues(state="all")
for issue in issues:
outfile = os.path.join(issues_dir, "issue-%s.json" % issue.number)
if os.path.exists(outfile):
Expand All @@ -33,7 +38,7 @@ def get_issues(issues_dir):
"state": issue.state,
"title": issue.title,
"number": issue.number,
"milestone": issue.milestone,
"milestone": issue.milestone.title if issue.milestone else None,
"labels": [x.name for x in issue.labels],
"id": issue.id,
"html_url": issue.html_url,
Expand All @@ -43,11 +48,6 @@ def get_issues(issues_dir):
write_json(meta, outfile)


token = os.environ.get("GITHUB_TOKEN")
if not token:
sys.exit("Yo dawg this is a LOT of API calls, you really need a GITHUB_TOKEN")


def get_parser():
parser = argparse.ArgumentParser(
description="Spack Issue Downloaded",
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ And then try to match issues to error messages:

```
python 3.spack-issues-match.py
Found 319 issues with errors, 2046 issues without matches.
Found 1469 issues with errors, 27938 issues without matches.
Found 30000 spack-monitor errors!
Found a total of 233205 errors
Found 719 unique errors in the spack monitor set.
```

This will generate [data/spack-issue-errors.json](data/spack-issue-errors.json)
Expand Down

0 comments on commit 23bc16b

Please sign in to comment.