Skip to content

GitHub Sponsors webhook receiver and Slack forwarder

Notifications You must be signed in to change notification settings

bbs99168/today

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sponsors-functions

GitHub Sponsors webhook receiver and Slack forwarder, written in Node.js

License: MIT OpenFaaS

This function is hosted on OpenFaaS Cloud, see the commits page for the build logs. The dashboard is private, but contains runtime logs and metrics.

Usage

This function receives and validates a webhook from GitHub Sponsors using the node12 template from OpenFaaS.

Each message is verified using the crypto library and HMAC.

Messages that pass HMAC are then sent over to a secret webhook URL and appear in Slack

It is triggered by any event from GitHub Sponsors

There's a switch statement on each event, which sends send a "pretty" string such as Person X just sponsored you, or Person X cancelled their sponsorship including an appropriate emoticon for the action taken by the user.

Example

Development or getting your own

export WEBHOOK=""
export SLACK=""

faas-cli cloud seal --name alexellis-sponsors \
 --literal webhook-secret=$WEBHOOK \
 --literal slack-url=$SLACK
  • Fire a test event from your sponsors page

See also: SponsorshipEvent

About

GitHub Sponsors webhook receiver and Slack forwarder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%