1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { email } from "https://esm.town/v/std/email?v=9";
export const githubStarWebhook = async (
req: express.Request,
res: express.Response,
) => {
const { action, sender, repository } = JSON.parse(req.body.payload);
if (action === "created") {
await email({
text: `Repository ${repository.full_name} starred by ${sender.login}`,
});
}
res.send(200);
};