Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
import { email } from "https://esm.town/v/std/email?v=9";
export const sendResponse = 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);
};
October 23, 2023