Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(infra): add github pr event feed #7403

Closedt3-code-bot[bot](GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromfeat/github-pr-event-feedopened View on GitHub

Showing 18 changed files with 119 additions and 0 deletions (loading 16).

x
0 of 18 viewed, 18 left
119 additions and 0 deletionsdocs/operations/github-pr-event-feed.mdAdded
View file
@@ -0,0 +1,119 @@
+# github pr event feed
+​
+this service receives github webhook deliveries for `pingdotgg/t3code` and exposes them as a replayable server-sent event feed. contributors can use the feed as the wake-up input for pr babysitters instead of polling github.
+​
+## deploy
+​
+set these secrets in the deployment environment:
+​
+- `GITHUB_WEBHOOK_SECRET`: a random secret of at least 32 characters shared only with github
+- `GITHUB_EVENTS_FEED_TOKEN`: a separate random token of at least 32 characters distributed to feed subscribers
+- `CLOUDFLARE_API_TOKEN`: the alchemy deployment credential
+- `CLOUDFLARE_ACCOUNT_ID`: the target cloudflare account
+​
+`GITHUB_REPOSITORY` defaults to `pingdotgg/t3code`.
+​
+```sh
+vp run --filter t3code-github-events deploy --stage prod
+```
+​
+save the worker url returned by alchemy.
+​
+## configure github
+​
+create one repository webhook with:
+​
+- payload url: `<worker-url>/v1/github/webhook`
+- content type: `application/json`
+- secret: the exact `GITHUB_WEBHOOK_SECRET`
+- ssl verification: enabled
+- events: