https://github.com/pawk/lambda-with-github-webhook
Higher order function which will validate AWS lambda request as a Github Webhook request, and if yes it will execute callback function
https://github.com/pawk/lambda-with-github-webhook
Last synced: 10 months ago
JSON representation
Higher order function which will validate AWS lambda request as a Github Webhook request, and if yes it will execute callback function
- Host: GitHub
- URL: https://github.com/pawk/lambda-with-github-webhook
- Owner: pawk
- License: gpl-3.0
- Created: 2019-02-07T17:39:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-07T18:06:12.000Z (almost 7 years ago)
- Last Synced: 2024-10-16T09:31:24.146Z (over 1 year ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Lambda with Github Webhook
AWS lambda function wrapper providing validation layer for requests sent from Github Webhook.
## Installation
```
npm i --save lambda-with-github-webhook
```
## Usage
This higher order function is meant to be used on AWS lambda platform (or any other nodejs-driven environment), hence there is no dependency on `crypto` package in package.json.
```
// lambda handler file
const withGithubWebhook = require('lambda-with-github-webhook');
function callback(event, context, callback) {
// your business logic
// AWS lambda specifics passed through function arguments
}
module.exports.handler = withGithubWebhook(callback, { token: 'your webhook token' });
```