Skip to content

Commit 302c15a

Browse files
committed
Add bot- prefix to filenames for bot authors
1 parent afff4fc commit 302c15a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/glab_discussion/commands

src/glab_discussion/commands/read.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def _discussion_filename(discussion: Discussion, user_cache: dict[int, UserInfo]
2020
dt = sanitize_filename_part(first.created_at.split(".")[0])
2121
user = user_cache.get(first.author_id)
2222
name = sanitize_filename_part(display_name(user) if user else first.author_username)
23+
if user and user.is_bot:
24+
name = f"bot-{name}"
2325
short_id = sanitize_filename_part(discussion.id[:12])
2426
return f"{dt}-{name}-{short_id}.txt"
2527

0 commit comments

Comments
 (0)