From 3541a373f532bb25379db8c9697d8729dc19c5a7 Mon Sep 17 00:00:00 2001 From: zeudev Date: Mon, 26 Aug 2024 13:41:16 -0700 Subject: [PATCH] feat: copy repo page PR chart as image (#4027) --- pages/s/[org]/[repo]/index.tsx | 35 ++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/pages/s/[org]/[repo]/index.tsx b/pages/s/[org]/[repo]/index.tsx index 696caeaaf..0ef113359 100644 --- a/pages/s/[org]/[repo]/index.tsx +++ b/pages/s/[org]/[repo]/index.tsx @@ -575,14 +575,33 @@ export default function RepoPage({ repoData, ogImageUrl }: RepoPageProps) { className="lg:col-span-6 h-fit" /> - +
+ { + posthog.capture("Repo Pages: copied PR chart", { + repository: repoData.full_name, + }); + }} + options={{ + windowWidth: 1700, + allowTaint: true, + onclone: (document, element) => { + element.querySelectorAll("[data-copy-image-branding]").forEach((el) => { + el.classList.remove("hidden"); + }); + }, + }} + > + + + +