cloudfunc-gh-hook
v1.1.0
Published
Run a Github webhook on Google Cloud functions. This is a wrapper around [https://github.com/octokit/webhooks.js])(@octokit/webhook)'s `verifyAndReceive` method to simplify configuration specific to Google Cloud function.
Downloads
4
Readme
cloudfunc-gh-hook
Run a Github webhook on Google Cloud functions. This is a wrapper around [https://github.com/octokit/webhooks.js])(@octokit/webhook)'s verifyAndReceive
method to simplify configuration specific to Google Cloud function.
Installation
yarn add cloudfunc-gh-hook
Usage
import { handler } from "cloudfunc-gh-hook";
export const main = handler({
"release.released": (event) => console.log(event),
});
Development & Deployment
See https://github.com/benjlevesque/cloudfunc-gh-hook-template for details about development environment and deployment.
API
There is only a root endpoint that accepts a POST
HTTP request.
Possible responses:
- 404 for a non POST request
- 403 for an invalid or missing secret header
- 422 when missing required headers
x-github-delivery
,x-github-event
andx-hub-signature