Fixed approved comments lookup for users with capital letter in GitHub login (#330)

* Fixed approved commens lookup for users with capital letter in GitHub login

* handle other place too
This commit is contained in:
Mateusz Burzyński
2026-02-17 21:11:19 +00:00
committed by pullfrog[bot]
parent eb22433760
commit df13253d48
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -143786,7 +143786,8 @@ function hasThumbsUpFrom(comment, username) {
if (!comment.reactionGroups) return false;
const thumbsUp = comment.reactionGroups.find((g) => g.content === "THUMBS_UP");
if (!thumbsUp?.reactors?.nodes) return false;
return thumbsUp.reactors.nodes.some((r) => r?.login === username);
const usernameNeedle = username.toLowerCase();
return thumbsUp.reactors.nodes.some((r) => r?.login?.toLowerCase() === usernameNeedle);
}
function threadHasThumbsUpFrom(thread, username) {
const comments = thread.comments?.nodes ?? [];
+2 -1
View File
@@ -290,7 +290,8 @@ function hasThumbsUpFrom(comment: ReviewThreadComment, username: string): boolea
if (!comment.reactionGroups) return false;
const thumbsUp = comment.reactionGroups.find((g) => g.content === "THUMBS_UP");
if (!thumbsUp?.reactors?.nodes) return false;
return thumbsUp.reactors.nodes.some((r) => r?.login === username);
const usernameNeedle = username.toLowerCase();
return thumbsUp.reactors.nodes.some((r) => r?.login?.toLowerCase() === usernameNeedle);
}
function threadHasThumbsUpFrom(thread: ReviewThread, username: string): boolean {