зеркало из https://github.com/golang/build.git
bace88d50d
This change introduces two cloud functions: wikiwebhook and sendwikidiff. The former handles GitHub Wiki change events sent over HTTP and enqueues them on a pubsub topic for the latter to pick up. sendwikidiff then checks out the wiki repo and sends an email with the diff of the change to golang-wikichanges@. The reason it is split into two functions is due to GitHub’s timeout limit on webhook handlers (ten seconds). In testing, a cold boot of a function that does everything described above would sometimes hit that limit. Updates golang/go#27313 Change-Id: I1974e1434c7003482df724d6ea3b537e22231c36 Reviewed-on: https://go-review.googlesource.com/c/158642 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
README.md | ||
go.mod | ||
go.sum | ||
sendwikidiff.go | ||
sendwikidiff_test.go |
README.md
sendwikidiff Cloud Function
gcloud functions deploy HandleWikiChangePubSub \
--project=symbolic-datum-552 \
--runtime go111 \
--trigger-topic github.webhooks.golang.go.wiki \
--memory 1024 \
--set-env-vars=SENDGRID_API_KEY=<SENDGRID_API_KEY>