Skip to content

Commit 7df203f

Browse files
authored
Merge pull request #257 from banesullivan/fix/ghmeta-description
[hotfix] handle packages that lack a description on GitHub
2 parents 49d9136 + 26c5ad2 commit 7df203f

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/pyosmeta/cli/process_reviews.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def main():
4848
print("-" * 20)
4949

5050
# Update gh metrics via api for all packages
51+
print("Getting GitHub metrics for all packages...")
5152
repo_endpoints = process_review.get_repo_endpoints(accepted_reviews)
5253
all_reviews = process_review.get_gh_metrics(
5354
repo_endpoints, accepted_reviews

src/pyosmeta/models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def clean_strings(cls, string: str) -> str:
190190

191191
class GhMeta(BaseModel, UrlValidatorMixin):
192192
name: str
193-
description: str
193+
description: Optional[str]
194194
created_at: str
195195
stargazers_count: int
196196
watchers_count: int

src/pyosmeta/parse_issues.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def get_gh_metrics(
423423
pkg_meta = {}
424424
# url is the api endpoint for a specific pyos-reviewed package repo
425425
for pkg_name, url in endpoints.items():
426+
print(f"Processing GitHub metrics {pkg_name}")
426427
pkg_meta[pkg_name] = self.process_repo_meta(url)
427428

428429
# These 2 lines both hit the API directly

0 commit comments

Comments
 (0)