1
2
3
4
5
6
7
8
9
import { email } from "https://esm.town/v/std/email?v=11";
export const githubStarWebhook = async (req: Request) => {
const { action, sender, repository } = await req.json();
if (action === "created") {
email({ text: `Repository ${repository.full_name} starred by ${sender.login}` });
}
return new Response("OK", { status: 200 });
};