Skip to content

Commit

Permalink
fix: relase ReviewUser name to accept None, add docs (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasser authored Nov 21, 2024
1 parent 44ebf9f commit fb5e6f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Fixed

* Fix: Updated documentation throughout with a focus on how a user's name is accessed and updated (@lwasser)
* Fix: ReviewUser object name can be optional. There are times when we don't have the actual person's name only the GH username (@lwasser)

## [v0.3.7] - 2024-08-27

Expand Down
4 changes: 1 addition & 3 deletions src/pyosmeta/cli/update_review_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ def main():
contrib_types = process_contribs.contrib_types

for pkg_name, review in packages.items():
if pkg_name == "automata":
print("Let's check this data out")
print("Processing review team for:", pkg_name)
for role in contrib_types.keys():
user: list[ReviewUser] | ReviewUser = getattr(review, role)
Expand All @@ -156,7 +154,7 @@ def main():
a_user, contribs = process_user(
a_user, role, pkg_name, contribs, process_contribs
)
# update individual user in reference to issue list
# Update individual user within the user list
user[i] = a_user
elif isinstance(user, ReviewUser):
user, contribs = process_user(
Expand Down
2 changes: 1 addition & 1 deletion src/pyosmeta/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def clean_date(cls, a_date: Optional[str]) -> str:
class ReviewUser(BaseModel):
"""Minimal model of a github user, used in several places in review parsing"""

name: str
name: str | None
github_username: str

@field_validator("github_username", mode="after")
Expand Down

0 comments on commit fb5e6f1

Please sign in to comment.