|
23 | 23 | from adabot.lib import common_funcs
|
24 | 24 | from adabot.lib import assign_hacktober_label as hacktober
|
25 | 25 | from adabot.lib import blinka_funcs
|
26 |
| -from adabot.lib import community_bundle_announcer |
| 26 | +from adabot.lib import bundle_announcer |
27 | 27 | from adabot import circuitpython_library_download_stats as dl_stats
|
28 | 28 |
|
29 | 29 | GH_INTERFACE = pygithub.Github(os.environ.get("ADABOT_GITHUB_ACCESS_TOKEN"))
|
@@ -124,8 +124,6 @@ def run_library_checks(validators, kw_args, error_depth):
|
124 | 124 | repo_needs_work = []
|
125 | 125 | since = datetime.datetime.now() - datetime.timedelta(days=7)
|
126 | 126 | repos_by_error = {}
|
127 |
| - new_libs = {} |
128 |
| - updated_libs = {} |
129 | 127 |
|
130 | 128 | validator = cirpy_lib_vals.LibraryValidator(
|
131 | 129 | validators, bundle_submodules, latest_pylint, **kw_args
|
@@ -172,14 +170,6 @@ def run_library_checks(validators, kw_args, error_depth):
|
172 | 170 | logger.info(", ".join(validator.output_file_data))
|
173 | 171 | validator.output_file_data.clear()
|
174 | 172 |
|
175 |
| - # get a list of new & updated libraries for the last week |
176 |
| - if repo["name"] != "Adafruit_CircuitPython_Bundle": |
177 |
| - check_releases = common_funcs.is_new_or_updated(repo) |
178 |
| - if check_releases == "new": |
179 |
| - new_libs[repo["name"]] = repo["html_url"] |
180 |
| - elif check_releases == "updated": |
181 |
| - updated_libs[repo["name"]] = repo["html_url"] |
182 |
| - |
183 | 173 | logger.info("")
|
184 | 174 | logger.info("State of CircuitPython + Libraries + Blinka")
|
185 | 175 |
|
@@ -332,21 +322,23 @@ def run_library_checks(validators, kw_args, error_depth):
|
332 | 322 | )
|
333 | 323 | logger.info("*This is normal for CI runs from PRs*")
|
334 | 324 |
|
| 325 | + new_libs, updated_libs = bundle_announcer.get_adafruit_bundle_updates() |
| 326 | + |
335 | 327 | logger.info("")
|
336 | 328 | logger.info("#### Library updates in the last seven days:")
|
337 | 329 | if len(new_libs) != 0:
|
338 | 330 | logger.info("* **New Libraries**")
|
339 |
| - for title, link in new_libs.items(): |
| 331 | + for title, link in new_libs: |
340 | 332 | logger.info(" * [%s](%s)", title, link)
|
341 | 333 | if len(updated_libs) != 0:
|
342 | 334 | logger.info("* **Updated Libraries**")
|
343 |
| - for title, link in updated_libs.items(): |
| 335 | + for title, link in updated_libs: |
344 | 336 | logger.info(" * [%s](%s)", title, link)
|
345 | 337 |
|
346 | 338 | (
|
347 | 339 | new_community_libs,
|
348 | 340 | updated_community_libs,
|
349 |
| - ) = community_bundle_announcer.get_community_bundle_updates() |
| 341 | + ) = bundle_announcer.get_community_bundle_updates() |
350 | 342 | if len(new_community_libs) != 0:
|
351 | 343 | logger.info("* **New Community Libraries**")
|
352 | 344 | for title, link in new_community_libs:
|
|
0 commit comments