Write you own GitHub webhooks with Deno Deploy.

Related tags

UI Framework hooray
Overview

Hooray

Write you own GitHub webhooks with Deno Deploy. Deno Deploy is where you can distribute your JavaScript/TypeScript code to the edge with one line of command.

Quick start

Setup your Deno Deploy account and create a new project then write your webhook logic in TypeScript with full typing support.

// main.ts
import {
  app,
  makeLarkSender,
  pullRequest,
  pullRequestReview,
} from "https://deno.land/x/ghook/mod.ts";

const send = makeLarkSender(YOUR_LARK_ENDPOINT);

app("/webhook", { secret: "test" })
  .on("pull_request", (e) => send(pullRequest(e)))
  .on("pull_request_review", (e) => send(pullRequestReview(e)));

Now copy the code into Deno Deploy's playground or deploy it with deployctl:

deployctl deploy --project=YOUR_PROJECT_NAME --prod ./main.ts

Copy the URL of the webhook and paste it in the GitHub repo's webhook settings, the pathname in the example code is /webhook, so the url will be https://YOUR_PROJECT_NAME.deno.dev/webhook.

You can also create multiple endpoints for different repos so you can reuse some code. Just call app multiple times:

app("/webhook1");
app("/webhook2");
app("/webhook3");

It also provided some function to generate markdown texts in reponse to certain GitHub events including pullRequest, pullRequestReview, etc.

You might also like...

🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Dec 10, 2022

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Dec 12, 2022

A GitHub Action to generate reports that contain all the SSH keys, personal access tokens, GitHub App installations, deploy keys and their respective permissions authorized against a GitHub organization.

A GitHub Action to generate reports that contain all the SSH keys, personal access tokens, GitHub App installations, deploy keys and their respective permissions authorized against a GitHub organization.

Dec 13, 2022

Sample of CI/CD auto deploy to own server via Github Actions

Psst — looking for a more complete solution? Check out SvelteKit, the official framework for building web applications of all sizes, with a beautiful

Mar 19, 2022

As of right now, you can't manage Discord webhooks on mobile

Hookly Manage your Discord server's webhooks via Slash Commands Why? As of right now, you can't manage Discord webhooks on mobile. I main reason I bui

Apr 27, 2022

This is a boilerplate for creating your own languages for various use cases. You can even create your own programming language from scratch!

Bootstrap compiler This is a bootstrap compiler that can be used to compile to compiler written in the target language. You can write a compiler in th

Nov 14, 2022

Integrate Railway Project events with Telegram Chat/Channel using Railway Webhooks

Railway to Telegram Integrate Railway Project events with Telegram Chat/Channel using Railway Webhooks! One Click Self Deploy Manual Self Deploy Fork

Jul 5, 2022

Generate social preview images in your Next.js API from Sanity webhooks

Generate social preview images in your Next.js API from Sanity webhooks

sanity-next-social-image-generator Automatically generate social share images using Sanity webhooks, and your Next.js API! Requirements A Next.js appl

Sep 4, 2022

An application for sending webhooks on Discord.

An application for sending webhooks on Discord.

Cordhook 🪝 Cordhook is an application for sending webhooks on Discord with ease. 🛠 Built with Tauri for desktop and Next.js for web. 🎨 Styled with

Jan 4, 2023

Slack Integration to receive incoming webhooks from openpix.com.br

Slack Integration to receive incoming webhooks from openpix.com.br

Slack Integration This is a aws lambda function to receive new transaction informations from OpenPix @ your company's slack workspace. Getting Started

Sep 19, 2022

Type safe library for interacting with Mindbody's Public API (v6) and Webhooks

Mindbody API Type safe library for interacting with Mindbody's Public API (v6) and Webhooks ⚠️ Read before installing This library is typed according

Dec 9, 2022

medusa-plugin-webhooks

medusa-plugin-webhooks

Medusa Plugin Webhooks About Participants Anish De GitHub: @AnishDe12020 Twitter: @AnishDe12020 Discord: AnishDe12020#8442 (ID: 727047127271735387) De

Dec 18, 2022

This React-Based WebPage allows the client/user system to create their own blog, where users can publish their own opinions.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Jul 28, 2022

zkPoB is a mobile compatible tool that lets anyone prove they own a Bufficorn (or any NFT) without revealing which Buffi they own or the address they are verifying themselves with

zkPoB is a mobile compatible tool that lets anyone prove they own a Bufficorn (or any NFT) without revealing which Buffi they own or the address they are verifying themselves with

zkPoB is a mobile compatible tool that lets anyone prove they own a Bufficorn (or any NFT) without revealing which Buffi they own or the address they are verifying themselves with

Aug 25, 2022

A server side rendering framework for Deno CLI and Deploy. 🦟 🦕

nat A server side rendering framework for Deno CLI and Deploy. Incorporating acorn, nano-jsx, and twind, it provides the tooling to provide a server c

Nov 17, 2022

How to write your own JS/TS codemods, with comments and resources

simple-codemod-script This is an example of how to write your own codemod scripts using babel and recast. There are comments throughout the code expla

Feb 9, 2022

Reference for How to Write an Open Source JavaScript Library - https://egghead.io/series/how-to-write-an-open-source-javascript-library

Reference for How to Write an Open Source JavaScript Library The purpose of this document is to serve as a reference for: How to Write an Open Source

Dec 24, 2022

Deno bindings for yoga, using Deno FFI.

deno_yoga Deno bindings for yoga, using Deno FFI. Usage flags: --allow-ffi: Requires ffi access to "yogacore.dll", "libyogacore.so", "libyogacore.dyli

Feb 11, 2022

deno-ja (Deno Japanese community) showcase

Showcase Deno本家よりも気軽に作ったものを公開できるようなShowcaseです。 スクリーンショットの撮影方法 短めのidを決めていただいて、下記のようにスクリプトを実行してください。 deno task screenshot [url] [id] ※エラーが出る場合は、下記を実行してみ

Oct 28, 2022
Owner
Build things to make life easier.
null
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and more.

Write components once, run everywhere. Compiles to: At a glance Mitosis is inspired by many modern frameworks. You'll see components look like React c

Builder.io 7.7k Jan 1, 2023
🙌 Check if a Discord user is sponsoring you/someone on GitHub and give them roles!

Discord: Is User Sponsor? A bot that gives roles if a user is supporting you on GitHub! Uses Discord OAuth and Discord GitHub integration to get user'

EGGSY 18 Jun 27, 2022
OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.

OpenUI5. Build Once. Run on any device. What is it? OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on al

SAP 2.7k Dec 31, 2022
A modest JavaScript framework for the HTML you already have

Stimulus A modest JavaScript framework for the HTML you already have Stimulus is a JavaScript framework with modest ambitions. It doesn't seek to take

Hotwire 11.7k Dec 29, 2022
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test and also deploy.

GraphQL Blog graphqlblog.com Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test an

GraphQLApps 6 Aug 17, 2022
🦕 An example utilities bot using Deno with harmony as framework, hosted on Deno Deploy

Pekusara An example utilities bot using Deno with harmony as framework. Invite the production bot to your server. Invite Scripts Add the bot token to

Eliaz Bobadilla 6 Nov 12, 2022
This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Bruno Bernardino 15 Dec 3, 2022
TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy

Atlas SDK atlas_sdk is a TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy Links Docs Import Replace LATEST_VERSION with current latest versi

Erfan Safari 20 Dec 26, 2022