Refactor codebase to by DRY
This commit is contained in:
parent
c925079e8b
commit
83a526c533
13 changed files with 320 additions and 131 deletions
28
README.md
28
README.md
|
|
@ -1,14 +1,34 @@
|
|||
# matrix-ops-bot
|
||||
|
||||
a bot for ops in matrix
|
||||
> a bot for ops in matrix
|
||||
|
||||
Current features:
|
||||
This bot catches webhooks and forwards them as messages to matrix rooms.
|
||||
|
||||
* Catch PagerDuty webhooks and forward them to a matrix room
|
||||
Current supported webhooks:
|
||||
|
||||
* PagerDuty
|
||||
* AWS SNS
|
||||
* Gitlab
|
||||
|
||||
## Usage
|
||||
|
||||
Note: Register your bot user manually. This program does not register a new user.
|
||||
See [config.json.sample](config.json.sample) for a sample config file.
|
||||
|
||||
Once you have a basic config (leave the routing_keys an empty list), you can easily add new webhooks with
|
||||
|
||||
```console
|
||||
$ poetry run config add-hook --name my-hook-name --hook-type gitlab --room-id '!abcd1234:matrix.org'
|
||||
|
||||
Hook added successfully
|
||||
|
||||
Your webhook URL is:
|
||||
/hook/vLyPN5mqXnIGE-4o9IKJ3vsOMU1xYEKBW8r4WMvP
|
||||
The secret token is:
|
||||
6neuYcncR2zaeQiEoawXdu6a4olsfH447tFetfvv
|
||||
```
|
||||
|
||||
Note: Register your bot user manually. This program does not register a new
|
||||
user. You must also accept invitations to join the room automatically.
|
||||
|
||||
```
|
||||
docker build -t registry.gitlab.com/guardianproject-ops/matrix-ops-bot .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue