aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-13 16:02:56 +0100
committerGravatar jesopo2019-09-13 16:02:56 +0100
commit7589262fbe22ab412a5f46f704df393bdc4fc175 (patch)
tree8013d162a77f8abc8e1d9d00616e5c8033d5a513 /docs
parentadd rest_api example nginx config (diff)
signature
add rest_api.md and git_webhook.md help documents
Diffstat (limited to 'docs')
-rw-r--r--docs/help/git_webhooks.md21
-rw-r--r--docs/help/rest_api.md11
2 files changed, 32 insertions, 0 deletions
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 &lt;bot> apikey <comment> /api/github /api/gitea`
+e.g.
+> /msg &lt;bot> apikey github-jesopo /api/github /api/gitea`
+
+### Enable hook in-channel
+
+#### For single repository
+> !webhook add <organisation>/<repository>
+
+#### For whole organisation
+> !webhook add <organisation>
+
+### Format webhook URL
+
+GitHub: `https://example.com:5000/api/github?key=<apikey>`
+Gitea: `https://example.com:5000/api/gitea?key=<apikey>`
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 <bot> config bot rest-api on`
+* `/msg <bot> 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`