Skip to content

Commit

Permalink
Name existing reviewers in the tooltip (#1259)
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion authored Dec 21, 2024
1 parent f8758c8 commit 1ca37b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org-cyf-itp/assets/custom-scripts/reviews/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 1ca37b5

Please sign in to comment.