add rest_api.md and git_webhook.md help documents
This commit is contained in:
parent
a77422f6f6
commit
7589262fbe
2 changed files with 32 additions and 0 deletions
21
docs/help/git_webhooks.md
Normal file
21
docs/help/git_webhooks.md
Normal file
|
@ -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 <comment> /api/github /api/gitea`
|
||||||
|
e.g.
|
||||||
|
> /msg <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>`
|
11
docs/help/rest_api.md
Normal file
11
docs/help/rest_api.md
Normal file
|
@ -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`
|
Loading…
Reference in a new issue