2019-04-13 22:35:33 +02:00
|
|
|
[![Build Status](https://travis-ci.org/binaryplease/gitea-matrix-bot.svg?branch=master)](https://travis-ci.org/binaryplease/gitea-matrix-bot)
|
|
|
|
[![GoDoc](https://godoc.org/github.com/binaryplease/gitea-matrix-bot?status.svg)](https://godoc.org/github.com/binaryplease/gitea-matrix-bot)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/binaryplease/gitea-matrix-bot)](https://goreportcard.com/report/github.com/binaryplease/gitea-matrix-bot)
|
|
|
|
[![codecov](https://codecov.io/gh/binaryplease/gitea-matrix-bot/branch/master/graph/badge.svg)](https://codecov.io/gh/binaryplease/gitea-matrix-bot)
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-20 22:25:02 +02:00
|
|
|
# gitea-matrix-bot (WORK IN PROGRESS!)
|
2019-04-13 21:59:16 +02:00
|
|
|
|
2019-04-13 22:22:00 +02:00
|
|
|
A bot to listen for [gitea](https://gitea.io) webhooks and post to a [matrix](https://matrix.org) channel
|
2019-04-13 22:17:51 +02:00
|
|
|
|
2019-04-20 22:53:39 +02:00
|
|
|
This bot was build using my [bot framework](https://github.com/binaryplease/matrix-bot/). If you stumble upon bugs on any of them please let me know!
|
|
|
|
|
2019-04-20 22:38:05 +02:00
|
|
|
Join the support channel for help and discussion:
|
2019-04-20 22:38:34 +02:00
|
|
|
[#gitea-matrix-bot:matrix.org](https://matrix.to/#/#gitea-matrix-bot:matrix.org)
|
2019-04-20 22:38:05 +02:00
|
|
|
|
2019-04-13 22:17:51 +02:00
|
|
|
# Usage
|
|
|
|
|
|
|
|
## Configuration
|
2019-04-20 22:25:52 +02:00
|
|
|
Copy config.ini.example to config.ini or create a file called config.ini with the
|
2019-04-13 22:17:51 +02:00
|
|
|
following options:
|
|
|
|
|
2019-04-13 22:19:00 +02:00
|
|
|
```ini
|
2019-04-13 22:17:51 +02:00
|
|
|
[http]
|
|
|
|
# The path the listener will expect the post data
|
|
|
|
http_uri = "/post"
|
|
|
|
# The port the listener will listen on
|
|
|
|
http_port = "9000"
|
|
|
|
|
2019-04-20 22:25:02 +02:00
|
|
|
|
2019-04-13 22:17:51 +02:00
|
|
|
[matrix]
|
|
|
|
# The matrix server to connect to
|
|
|
|
matrix_host = "http://matrix.org"
|
2019-04-20 22:25:02 +02:00
|
|
|
# The matrix room to post to
|
|
|
|
matrix_room = "#my-awesome-room:matrix.org"
|
2019-04-13 22:17:51 +02:00
|
|
|
# User credentions of the bot for posting to the room
|
|
|
|
matrix_pass = "supersecretpass"
|
|
|
|
matrix_user = "my-awesome-bot"
|
2019-04-20 22:25:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
[bot]
|
|
|
|
# Path of the database to be used
|
|
|
|
db_path = "./tokens.db"
|
2019-04-13 22:17:51 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Then start the bot. It will listen on the configured URI for incoming gitea
|
|
|
|
hooks.
|
|
|
|
|
|
|
|
## Create gitea hook
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-13 22:19:38 +02:00
|
|
|
It will probably look like this:
|
2019-04-13 22:17:51 +02:00
|
|
|
![gitea scrot](./gitea-scrot.png "Gitea Screenshot")
|