| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This service will listen to github webhooks fired by a given repository.
┌───────────────┐ ┌───────────┐
│ │ │ │
│ Github repo │ │ Github │
│ activity │────Trigger───▶│ Webhook │
│ │ │ │
└───────────────┘ └───────────┘
│
┌────POST────────┘
│
┌──────────▼─────────┐
│ ┌────────────────┐ │
│ │ API Gateway │ │
│ │ Endpoint │ │
│ └────────────────┘ │
└─────────┬──────────┘
│
│
┌──────────▼──────────┐
│ ┌────────────────┐ │
│ │ │ │
│ │ Lambda │ │
│ │ Function │ │
│ │ │ │
│ └────────────────┘ │
└─────────────────────┘
│
│
▼
┌────────────────────┐
│ │
│ Do stuff │
│ │
└────────────────────┘
provider:
name: aws
runtime: nodejs4.3
environment:
GITHUB_WEBHOOK_SECRET: REPLACE-WITH-YOUR-SECRET-HEREserverless deployAfter the deploy has finished you should see something like:
Service Information
service: github-webhook-listener
stage: dev
region: us-east-1
api keys:
None
endpoints:
POST - https://abcdefg.execute-api.us-east-1.amazonaws.com/dev/webhook
functions:
github-webhook-.....github-webhook-listener-dev-githubWebhookListener(1.) Plugin your API POST endpoint. (https://abcdefg.execute-api.us-east-1.amazonaws.com/dev/webhook in this example). Run sls info to grab your endpoint if you don't have it handy.
(2.) Plugin your secret from GITHUB_WEBHOOK_SECRET environment variable
(3.) Choose the types of events you want the github webhook to fire on
You can tail the logs of the lambda function with the below command to see it running.
serverless logs -f githubWebhookListener -tYou should see the event from github in the lambda functions logs.
Let us know if you come up with a cool use case for this service =)
| Back | FazBrowse Home | New Git URL |