From cc98c9d4ddbbc26c070fdbacc420ea14c914f353 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Mon, 13 Jan 2025 15:52:28 +0000 Subject: [PATCH] Tweak output format. It wasn't as clear and useful as it could be. User and repo are most important for working out if it needs responding to, so put them first. Include "Deletion: " text before the datetime to make it clear to what it refers. As discussed in Slack: https://bennettoxford.slack.com/archives/C069SADHP1Q/p1736765655458669?thread_ts=1736427127.238419&cid=C069SADHP1Q --- workspace/codespaces/codespaces.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/workspace/codespaces/codespaces.py b/workspace/codespaces/codespaces.py index 1153917..b294ede 100644 --- a/workspace/codespaces/codespaces.py +++ b/workspace/codespaces/codespaces.py @@ -158,13 +158,19 @@ def main(threshold_in_days): list_items = [ RichTextSectionElement( elements=[ + Text(text="User", style=BOLD), + Text(text=": "), Text(text=cs.owner, style=CODE), - Text(text=f" on {cs.retention_expires_at:%A, %b %d at %H:%M}"), - Text(text=f" ({remaining_days_text}) "), - Text(text="repo", style=BOLD), + Text(text=" Repo", style=BOLD), Text(text=": "), Text(text=cs.repo, style=CODE), - Text(text=" ID", style=BOLD), + Text(text=" Deletion", style=BOLD), + Text(text=": "), + Text( + text=f"in {remaining_days_text} " + f"({cs.retention_expires_at:%A, %b %d at %H:%M}) " + ), + Text(text="ID", style=BOLD), Text(text=": "), Text(text=cs.name, style=CODE), Text(text=" Retention", style=BOLD),