0.0.2 • Published 2 years ago

exo-use-github-webhook v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

exo-use-github-webhook

Exobase hook that will verify, validate, and parse incoming webhook request from GitHub

Install

yarn add exo-use-github-webhook

Usage

import _ from 'radash'
import { useGithubWebhook, GithubWebhookArgs } from 'exo-use-github-webhook'
import type { Props } from '@exobase/core'

async function handleGithubEvent({ args }: Props<GithubWebhookArgs>) {
  console.log('event: ', args.event)
  console.log('action: ', args.action)
  console.log('payload: ', JSON.stringify(args.payload))
}

export default _.compose(
  useLambda(),
  useGithubWebhook(''),
  handleGithubEvent
)