cloudfns: send email updates when the wiki changes
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>
diff --git a/cloudfns/wikiwebhook/go.mod b/cloudfns/wikiwebhook/go.mod
new file mode 100644
index 0000000..72c81c2
--- /dev/null
+++ b/cloudfns/wikiwebhook/go.mod
@@ -0,0 +1,10 @@
+module golang.org/x/build/cloudfns/wikiwebhook
+
+require (
+ cloud.google.com/go v0.34.0
+ github.com/googleapis/gax-go v2.0.2+incompatible // indirect
+ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
+ google.golang.org/api v0.1.0 // indirect
+ google.golang.org/genproto v0.0.0-20190111180523-db91494dd46c // indirect
+ google.golang.org/grpc v1.18.0 // indirect
+)