From 1ca37b5e2551b17c21d6aecbc77bb4bd1cf08f16 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Sat, 21 Dec 2024 10:38:41 +0000 Subject: [PATCH] Name existing reviewers in the tooltip (#1259) --- org-cyf-itp/assets/custom-scripts/reviews/index.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-cyf-itp/assets/custom-scripts/reviews/index.mjs b/org-cyf-itp/assets/custom-scripts/reviews/index.mjs index 8399a7332..26a659279 100644 --- a/org-cyf-itp/assets/custom-scripts/reviews/index.mjs +++ b/org-cyf-itp/assets/custom-scripts/reviews/index.mjs @@ -124,7 +124,9 @@ function render() { const emojiElement = prInList.querySelector(".emoji"); if (pr.hasReviewer()) { emojiElement.innerText = "🙋🏾"; - emojiElement.title = "Has reviewer"; + const reviewers = [...new Set(pr.reviews.filter((reviewer) => !reviewer.isPrAuthor).map((reviewer) => reviewer.userName))]; + const maybeS = reviewers.length === 1 ? "" : "s"; + emojiElement.title = `Has reviewer${maybeS}: ${reviewers.join(", ")}`; } else { emojiElement.innerText = ageToEmoji[pr.updatedAge]; }