Exploring the Github webhooks api.
- user A: "Sponsoring $20 to get a better test coverage"
- user B submits pr with title: "Fix: Sponsoring $20 to get a better test coverage"
- pr gets merged user B gets the $20
- Every sponsoring issue will start with "Sponsoring"
- To get the donation the pr title must be: "Fix: " + ${issue}
+--------------+ +------------------+ +-----------+
| index.js | | process inc req | | process |
| | ----> | > branch out | ---> | |
| (run server) | | based on event | | payload |
+--------------+ +------------------+ +-----------+
Chain reaction: when pr gets merged
+--------+ +------------------+ +----------------+
| start | | Pull all opened | | Launch |
| with | ----> | issues starting | ---> | transaction |
| Fix:? | | "Sponsoring:" | | when matching |
+--------+ +------------------+ +----------------+
To analyze payload before transaction, make sure:
- action is closed
- pull_request.merged === true
- repository.has_issues === true
- pull_request.title matches
We'll throw an exception if there's no match for now > the default being to not launch anything
We will worry about some NLP later && we only care about dev in master
Currently experimenting with ngrok. Read this article.
Events | Payloads | Ping
Webhooks can be managed using the JSON HTTP API or PubSubHubbub API
When configuring a webhook, you can choose which events you would like to receive payloads for.
By default, webhooks are only subscribed to the
pushevent.
Each event type has a specific payload format with the relevant information.
All event payloads mirror
the payloads for the Event types
Possibility to activate atFides by creating a new issue or by commenting on an issue.
anybody on Github can set up a repo to activate atfides