From 0b129c0dcebf2449d0c769eab12d6d94596c23fd Mon Sep 17 00:00:00 2001 From: Bhushan Agrawal Date: Fri, 23 Oct 2026 08:30:13 +0530 Subject: [PATCH 01/16] fix: link no-card page to the leaderboard and issues (#73) (#82) --- src/index.ts | 8 ++++++-- src/page.ts | 10 ++++++++-- test/card.test.ts | 23 ++++++++++++++++++++++- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 690d5ec..3ce1e5c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -263,10 +263,14 @@ async function handleContributor( "No card yet", [ `${login} has no counted pull requests in ${program.title}.`, - `A card appears with the first merged pull request that counts. The leaderboard is at ${new URL(boardPath, request.url).href}`, + "A card appears with the first merged pull request that counts.", ], false, - "No card" + "No card", + [ + { label: "See the leaderboard", href: boardPath }, + { label: "Find an issue", href: env.ISSUES_URL }, + ] ); return new Response(body, { status: 404, headers: { ...PAGE_HEADERS, "Cache-Control": "no-store", "Content-Security-Policy": CONTRIBUTOR_CSP } }); } diff --git a/src/page.ts b/src/page.ts index c0b8b41..f2e6a2c 100644 --- a/src/page.ts +++ b/src/page.ts @@ -232,7 +232,13 @@ ${links.others.length ? `
\n

Other programs

\n