Parses incoming webhook notifications from a Gitea server and publishes those messages to a given conversation (team or person or channel).
Inspired by keybase/managed-bots gitlabbot.
Keybase
Database
db_init.sql
to initialize the table Gitea Bot will use.go install .
$GOPATH/bin/giteabot --http-prefix "$HOSTNAME:8080" --dsn "user:pass@host/database" --secret "some_nonce" --announcement "convid" --err-report-conv "convid" --gitea-url "http://git.internal"
giteabot --help
for more options.!
commands, run the following:
keybase chat api -m '{"method": "clearcommands"}'
credentials.json
file in /keybase/private/$BOT_USERNAME/
in the following format:
{
"webhook_secret": "your secret here"
}
If you have KBFS running, you can now run the bot without providing --secret
command line options.
keybase chat api -p -m '{"method": "list"}' | less
$HOSTNAME:8080/giteabot
. This is its health check interface.$HOSTNAME:8080/giteabot/webhook
.There are a few complications running a Keybase chat bot, and it is likely easiest to deploy using Docker. See https://hub.docker.com/r/keybaseio/client for our preferred client image to get started.