Handle GitHub Webhooks with Deno and Deno Deploy.
import { on, webhooks } from "https://deno.land/x/github_webhooks@0.1.0/mod.ts";
A more complete example can be found in example/main.ts.
// main.ts
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
import { on, webhooks } from "https://deno.land/x/github_webhooks@0.1.0/mod.ts";
webhooks()(
on("issue_comment", ({ issue, comment }, _context) => {
console.info(
`@${comment.user.login} commented on issue #${issue.number}: ${comment.body}`,
);
}),
);
Run the example:
$ deployctl run --libs=ns,fetchevent main.ts
All contributions are very welcome!
If you find any bug or have a feature request, please open a new issue.
For code or documentation contributions, fork this repository, do your thing, and submit a Pull Request.
This project is released under the MIT License.