From 5fc65c7636e3523b18bdaf6b1aa077ecf0ae9224 Mon Sep 17 00:00:00 2001 From: pep Date: Thu, 11 Jun 2026 22:03:16 +0200 Subject: [PATCH] Use author name of the current comment not the one of the issue Signed-off-by: pep --- src/hooks/forgejo.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hooks/forgejo.rs b/src/hooks/forgejo.rs index 9a32686..d1defc3 100644 --- a/src/hooks/forgejo.rs +++ b/src/hooks/forgejo.rs @@ -38,7 +38,11 @@ impl From for Issue { action: Some(other.action.into()), title: other.issue.title, author: User { - name: other.issue.user.login, + name: other + .comment + .as_ref() + .map(|c| c.user.login.clone()) + .unwrap_or(other.issue.user.login), }, repository: Repository { name: other.repository.name, @@ -60,7 +64,11 @@ impl From for Note { merge_request: None, snippet: false, author: User { - name: other.issue.user.login, + name: other + .comment + .as_ref() + .map(|c| c.user.login.clone()) + .unwrap_or(other.issue.user.login), }, repository: Repository { name: other.repository.name,