Add configurable event publishing

This commit is contained in:
2023-09-17 00:56:02 -07:00
parent 4c00f45b1c
commit e3fffe1814
7 changed files with 339 additions and 93 deletions

View File

@@ -23,23 +23,8 @@ running `cargo install bebot`.
## Setup
Bebot requires a configuration file in YAML format. See
`sample-config.yaml` for all existing configuration options. They
should hopefully be fairly self-explanatory, but a few clarifications:
1. `bind_address` and `bind_port` determine what IP/interface and port
the webhook handler will listen on.
2. Bebot's webhook will be served from `/hooks/gitlab`. You can use
`url_prefix` to prepend further path segments in front of that.
3. `user_id` and `password` are for the Matrix user that the bot will
sign into Matrix as. Ensure that `user_id` is the full username,
including the homeserver.
4. `default_room` is the room that Bebot will publish to if not
specified in the per-repo configuration.
5. `repo_configs` is a map where the key is of the form
`$GITLAB_INSTANCE/$NAMESPACE/$REPO`. It is recommended that you use
a unique, randomly-generated `token` for each repository. You can
specify `room` here as well if you don't want messages to go to
`default_room`.
`sample-config.yaml` for all existing configuration options, as well as
documentation on what each option does.
When setting up the webhook in Gitlab, use the same `token` from the
configuration file in the webhook's "Secret token" field. You should