2019-09-13 15:02:56 +00:00
|
|
|
## Configure git webhooks
|
|
|
|
|
2019-09-13 15:05:18 +00:00
|
|
|
First, follow instructions at [/docs/help/rest_api.md](/docs/help/rest_api.md)
|
2019-09-13 15:02:56 +00:00
|
|
|
|
|
|
|
### Generate API key
|
2019-09-13 15:07:04 +00:00
|
|
|
> /msg <bot> apikey <comment> /api/github /api/gitea
|
2019-09-13 15:03:32 +00:00
|
|
|
|
2019-09-13 15:02:56 +00:00
|
|
|
e.g.
|
2019-09-13 15:03:32 +00:00
|
|
|
|
2019-09-13 15:07:04 +00:00
|
|
|
> /msg <bot> apikey github-jesopo /api/github /api/gitea
|
2019-09-13 15:02:56 +00:00
|
|
|
|
|
|
|
### Enable hook in-channel
|
|
|
|
|
|
|
|
#### For single repository
|
2019-09-13 15:03:59 +00:00
|
|
|
> !webhook add <organisation>/<repository>
|
2019-09-13 15:02:56 +00:00
|
|
|
|
|
|
|
#### For whole organisation
|
2019-09-13 15:03:59 +00:00
|
|
|
> !webhook add <organisation>
|
2019-09-13 15:02:56 +00:00
|
|
|
|
|
|
|
### Format webhook URL
|
|
|
|
|
|
|
|
GitHub: `https://example.com:5000/api/github?key=<apikey>`
|
|
|
|
Gitea: `https://example.com:5000/api/gitea?key=<apikey>`
|