Skip to content

Commit

Permalink
prettier ChangesRequestedStatus description
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Nov 14, 2024
1 parent 4672660 commit 93ae1ff
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bioimageio_collection_backoffice/remote_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,18 +867,17 @@ def request_changes(self, reviewer: str, reason: str):
# map reviewer id to name
for r in self.collection.config.reviewers:
if reviewer == r.id:
reviewer = r.name
break
else:
raise ValueError(reviewer)

self._set_status(ChangesRequestedStatus(description=reason))
description = (
f'<a href= "mailto: {r.email}"> {r.name}</a> requested changes: {reason}'
)
plain_description = f"{r.name} requested changes: {reason}"
self._set_status(ChangesRequestedStatus(description=description))
self.extend_chat(
Chat(
messages=[
Message(
author="system", text=f"{reviewer} requested changes: {reason}"
)
]
)
Chat(messages=[Message(author="system", text=plain_description)])
)

@log
Expand Down

0 comments on commit 93ae1ff

Please sign in to comment.