From 98135a697a024592c1283c3423342231fe0f19f1 Mon Sep 17 00:00:00 2001 From: Alida W Date: Mon, 25 Aug 2025 10:31:26 -0400 Subject: [PATCH] Reject early if comment author is nil --- .github/lib/discussions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/lib/discussions.rb b/.github/lib/discussions.rb index d20341aaf..5f9c607b2 100644 --- a/.github/lib/discussions.rb +++ b/.github/lib/discussions.rb @@ -443,7 +443,7 @@ def find_most_recent_incident_comment_id(actor_login:) return nil if comments.empty? - filtered_comments = comments.keep_if { |comment| comment["author"]["login"] == actor_login } + filtered_comments = comments.keep_if { |comment| comment["author"] && comment["author"]["login"] == actor_login } &.sort_by { |comment| comment["createdAt"] } .reverse