From 78acfe11087f5183e4029538e8515f8cae63a040 Mon Sep 17 00:00:00 2001 From: Matheesha Date: Mon, 4 Aug 2025 19:57:34 +0530 Subject: [PATCH 1/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a1fdafc..1eb88e3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ghpin A api to pin Github repositories to a readme file or anywhere else as a image + + From 8b7aa454e728932809cbfd4af9388cef6866033e Mon Sep 17 00:00:00 2001 From: Matheesha Date: Mon, 4 Aug 2025 20:04:52 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 1eb88e3..a1fdafc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,2 @@ # ghpin A api to pin Github repositories to a readme file or anywhere else as a image - - From 3d05c8b9a57077875a7af18e5a06dda931003561 Mon Sep 17 00:00:00 2001 From: Matheesha Date: Mon, 4 Aug 2025 20:07:52 +0530 Subject: [PATCH 3/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a1fdafc..54a67a9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # ghpin A api to pin Github repositories to a readme file or anywhere else as a image + + From 1d934df2e89dcc32902005ae787fd5ba16191081 Mon Sep 17 00:00:00 2001 From: Matheesha Date: Tue, 5 Aug 2025 00:11:11 +0530 Subject: [PATCH 4/7] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 54a67a9..a1fdafc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,2 @@ # ghpin A api to pin Github repositories to a readme file or anywhere else as a image - - From ae9ae0b1b80c4e0afd7a0bf8e672ff39770c352f Mon Sep 17 00:00:00 2001 From: Matheesha Senevirathne Date: Thu, 7 Aug 2025 07:09:20 +0530 Subject: [PATCH 5/7] update --- deno.json | 1 - src/functions.ts | 15 +-------------- src/gh/pkgs/script.ts | 0 src/gh/pkgs/templates/pkgs.svg | 18 ++++++++++++++++++ src/gh/profile/{profile.ts => script.ts} | 0 src/gh/repo/{repo.ts => script.ts} | 0 src/main.ts | 4 ++-- 7 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 src/gh/pkgs/script.ts create mode 100644 src/gh/pkgs/templates/pkgs.svg rename src/gh/profile/{profile.ts => script.ts} (100%) rename src/gh/repo/{repo.ts => script.ts} (100%) diff --git a/deno.json b/deno.json index a19d8eb..e7d5d66 100644 --- a/deno.json +++ b/deno.json @@ -3,7 +3,6 @@ "prod": "deno run --watch --allow-env --env --allow-net --allow-read --allow-write src/main.ts" }, "imports": { - "@astral/astral": "jsr:@astral/astral@^0.5.3", "@hono/hono": "jsr:@hono/hono@^4.8.12", "@std/assert": "jsr:@std/assert@1" }, diff --git a/src/functions.ts b/src/functions.ts index 0882cf2..728d879 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -39,17 +39,4 @@ export function formatNumber(n: number): string { if (n >= 1_000_000) return (n / 1_000_000).toFixed(1).replace(/\.0$/, '') + 'M'; if (n >= 1_000) return (n / 1_000).toFixed(1).replace(/\.0$/, '') + 'K'; return n.toString(); -} - -export async function takeScreenshot(url: string): Promise { - await using browser = await launch(); - - await using page = await browser.newPage(url); - - const screenshot = await page.screenshot(); - - browser.close() - - return screenshot.buffer - -} +} \ No newline at end of file diff --git a/src/gh/pkgs/script.ts b/src/gh/pkgs/script.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/gh/pkgs/templates/pkgs.svg b/src/gh/pkgs/templates/pkgs.svg new file mode 100644 index 0000000..8d16a39 --- /dev/null +++ b/src/gh/pkgs/templates/pkgs.svg @@ -0,0 +1,18 @@ + + + + Packages used in this project + + + + + NPM Packages + + + - jwtkn: v0.1.1 + + + - @headlessui/react: v2.2.6 + + + \ No newline at end of file diff --git a/src/gh/profile/profile.ts b/src/gh/profile/script.ts similarity index 100% rename from src/gh/profile/profile.ts rename to src/gh/profile/script.ts diff --git a/src/gh/repo/repo.ts b/src/gh/repo/script.ts similarity index 100% rename from src/gh/repo/repo.ts rename to src/gh/repo/script.ts diff --git a/src/main.ts b/src/main.ts index 703aa9f..48302f8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { Hono } from '@hono/hono' -import getGhRepo from "./gh/repo/repo.ts"; -import getGhprofile from "./gh/profile/profile.ts"; +import getGhRepo from "./gh/repo/script.ts"; +import getGhprofile from "./gh/profile/script.ts"; const app = new Hono() From 9d7cb0bdbcb647ccc09c700a24b8d6d1b40e8d82 Mon Sep 17 00:00:00 2001 From: Matheesha Senevirathne Date: Mon, 24 Nov 2025 23:36:50 +0530 Subject: [PATCH 6/7] Remove bearer token --- src/gh/repo/script.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gh/repo/script.ts b/src/gh/repo/script.ts index 3de606b..69151a5 100644 --- a/src/gh/repo/script.ts +++ b/src/gh/repo/script.ts @@ -2,7 +2,7 @@ import { Hono } from '@hono/hono' import { escapeXml, getLangColor, topLang } from "../../functions.ts"; const api = 'https://api.github.com/repos/' -const key = Deno.env.get('GH_TOKEN') +//const key = Deno.env.get('GH_TOKEN') export default function getGhRepo(app: Hono) { app.get('/gh/repo/:owner/:repo', async (c) => { @@ -25,7 +25,7 @@ export default function getGhRepo(app: Hono) { const repo_req = await fetch(`${api}${owner}/${repo}`, { headers: { 'User-Agent': 'PinStack - @ItsMatheesha[Github]', - 'Authorization': `Bearer ${key}` + // 'Authorization': `Bearer ${key}` } }) //if the api request failed From 965c9ee79c6cbac429faf525710c6ca7a379964c Mon Sep 17 00:00:00 2001 From: "deno-deploy[bot]" <75045203+deno-deploy[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:11:16 +0000 Subject: [PATCH 7/7] [Deno Deploy] Update .github/workflows/deploy.yml