diff --git a/docs/help/git_webhooks.md b/docs/help/git_webhooks.md new file mode 100644 index 00000000..7d4e54dd --- /dev/null +++ b/docs/help/git_webhooks.md @@ -0,0 +1,21 @@ +## Configure git webhooks + +First, follow instructions at [/docs/rest_api.md](/docs/rest_api.md) + +### Generate API key +> /msg <bot> apikey /api/github /api/gitea` +e.g. +> /msg <bot> apikey github-jesopo /api/github /api/gitea` + +### Enable hook in-channel + +#### For single repository +> !webhook add / + +#### For whole organisation +> !webhook add + +### Format webhook URL + +GitHub: `https://example.com:5000/api/github?key=` +Gitea: `https://example.com:5000/api/gitea?key=` diff --git a/docs/help/rest_api.md b/docs/help/rest_api.md new file mode 100644 index 00000000..8aaff68d --- /dev/null +++ b/docs/help/rest_api.md @@ -0,0 +1,11 @@ +## Configure REST API + +### Enable REST API +* `/msg config bot rest-api on` +* `/msg reloadmodule rest_api` + +### Configure HTTPd +#### Nginx +* Copy example config file from [docs/rest_api/nginx](docs/rest_api/nginx) to `/etc/nginx/sites-enabled` +* Edit `server-name`, `ssl_certificate` and `ssl_certificate_key` +* `service nginx restart`