Skip to content

Commit fddc0fa

Browse files
authored
Merge pull request #177 from jepler/warn-no-descr-repos
Print a warning for repos without descriptions
2 parents e04ae47 + 3ad7fb4 commit fddc0fa

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

adabot/circuitpython_libraries.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,14 @@ def run_library_checks(validators, bundle_submodules, latest_pylint, kw_args):
231231
int(pr_sort_re.search(pr).group(1)) for pr in lib_insights["open_prs"]
232232
if pr_sort_re.search(pr) is not None
233233
]
234-
output_handler(
235-
" * {0} open pull requests (Oldest: {1}, Newest: {2})".format(
236-
len(lib_insights["open_prs"]),
237-
max(open_pr_days),
238-
max((min(open_pr_days), 1)) # ensure the minumum is '1'
234+
if len(lib_insights["open_prs"]) != 0:
235+
output_handler(
236+
" * {0} open pull requests (Oldest: {1}, Newest: {2})".format(
237+
len(lib_insights["open_prs"]),
238+
max(open_pr_days),
239+
max((min(open_pr_days), 1)) # ensure the minumum is '1'
240+
)
239241
)
240-
)
241242
output_handler("Library updates in the last seven days:")
242243
if len(new_libs) != 0:
243244
output_handler("**New Libraries**")

adabot/lib/circuitpython_library_validators.py

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
" without reference to import errno. See issue " \
5757
"https://github.com/adafruit/circuitpython/issues/1582"
5858
ERROR_MISMATCHED_READTHEDOCS = "Mismatched readthedocs.yml"
59+
ERROR_MISSING_DESCRIPTION = "Missing repository description"
5960
ERROR_MISSING_EXAMPLE_FILES = "Missing .py files in examples folder"
6061
ERROR_MISSING_EXAMPLE_FOLDER = "Missing examples folder"
6162
ERROR_EXAMPLE_MISSING_SENSORNAME = "Example file(s) missing sensor/library name"
@@ -209,6 +210,9 @@ def validate_repo_state(self, repo):
209210

210211
errors = []
211212

213+
if not repo_fields.get("description"):
214+
errors.append(ERROR_MISSING_DESCRIPTION)
215+
212216
if repo_fields.get("has_wiki"):
213217
errors.append(ERROR_WIKI_DISABLED)
214218

0 commit comments

Comments
 (0)