blathers

package module
v0.0.0-...-9b8be81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 19 Imported by: 0

README

Blathers

Getting Secrets

Secrets can be viewed here.

Developing Locally

  • Get this code: go get -u go/src/github.com/cockroachlabs/blathers-bot
  • base64 encode the private key for the bot, then export it: export BLATHERS_GITHUB_PRIVATE_KEY=<your token here>.
  • Optionally set BLATHERS_GITHUB_CLIENT_ID if using a different app, and BLATHERS_GITHUB_APP_SECRET if the we should check the secret matches for the webhook.
  • Now can run the following to start the server
go run ./serv
  • Then CURL your webhook request to test.
curl localhost:8080/github_webhook -H 'X-Github-Event: <event>' --header "Content-Type:application/json" --data '<data>'
  • Example data is available in example_webhooks/. You can run curl with them:
curl localhost:8080/github_webhook -H 'X-Github-Event: pull_request'  --header "Content-Type:application/json" --data "@./example_webhooks/app_webhook_synchronize"

Deployment

After merging your change, click "Deploy" on here.

Re-deliver Payloads

Go here and click "redeliver" after you find a request you like.

Blathers Inspiration

"Eeek! A bug...! Ah, I beg your pardon! I just don't like handling these things much!"

Blathers is an owl who hates bugs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudFunction

func CloudFunction(w http.ResponseWriter, r *http.Request)

CloudFunction is a compatibility piece for running on Cloud Functions.

func DebuggingPrefix

func DebuggingPrefix(ctx context.Context) string

func RequestID

func RequestID(ctx context.Context) string

func Server

func Server() *blathersServer

Server returns the blathers server. This is made to be compatible with running as main.

func WithDebuggingPrefix

func WithDebuggingPrefix(ctx context.Context, text string) context.Context

func WithRequestID

func WithRequestID(ctx context.Context, requestID string) context.Context

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL