Skip to content

Commit

Permalink
Merge pull request #175 from adafruit/good_first_issues
Browse files Browse the repository at this point in the history
Now outputs the number of good first issues
  • Loading branch information
jepler authored Jul 10, 2020
2 parents 2180ee8 + 1ac1492 commit 20501cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions adabot/circuitpython_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def run_library_checks(validators, bundle_submodules, latest_pylint, kw_args):
print_issue_overview(lib_insights)
output_handler("* https://circuitpython.org/contributing")
output_handler(" * {} open issues".format(len(lib_insights["open_issues"])))
output_handler(" * {} good first issues".format(lib_insights["good_first_issues"]))
open_pr_days = [
int(pr_sort_re.search(pr).group(1)) for pr in lib_insights["open_prs"]
if pr_sort_re.search(pr) is not None
Expand Down
5 changes: 5 additions & 0 deletions adabot/lib/circuitpython_library_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ def gather_insights(self, repo, insights, since, show_closed_metric=False):
insights["new_issues"] += 1
insights["issue_authors"].add(issue_info["user"]["login"])
insights["active_issues"] += 1

else:
insights["closed_issues"] += 1
insights["issue_closers"].add(issue_info["closed_by"]["login"])
Expand Down Expand Up @@ -954,6 +955,10 @@ def gather_insights(self, repo, insights, since, show_closed_metric=False):
issue_link = "{0} (Open {1} days)".format(issue["html_url"],
days_open.days)
insights["open_issues"].append(issue_link)
if "labels" in issue:
for i in issue["labels"]:
if i["name"] == 'good first issue':
insights["good_first_issues"] += 1

# process Hacktoberfest labels if it is Hacktoberfest season
in_season, season_action = hacktober.is_hacktober_season()
Expand Down
1 change: 1 addition & 0 deletions adabot/lib/common_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ def __init__(self):
"new_issues": 0,
"active_issues": 0,
"open_issues": [],
"good_first_issues": 0,
"issue_authors": set(),
"issue_closers": set(),
"hacktober_assigned": 0,
Expand Down

0 comments on commit 20501cf

Please sign in to comment.